replace common qcom sources with samsung ones
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "smcinvoke: %s: " fmt, __func__
|
||||
@@ -2485,7 +2485,7 @@ static void add_mem_obj_info_to_async_side_channel_locked(void *buf, size_t buf_
|
||||
|
||||
msg->count = index;
|
||||
|
||||
pr_debug("Added %zu memory objects to the side channel, total size = %zu\n", index, used);
|
||||
pr_debug("Added %lu memory objects to the side channel, total size = %zu\n", index, used);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -2780,7 +2780,6 @@ static long process_invoke_req(struct file *filp, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int ret = -1, nr_args = 0;
|
||||
int nr_args_cnt = 0;
|
||||
struct smcinvoke_cmd_req req = {0};
|
||||
void *in_msg = NULL, *out_msg = NULL;
|
||||
size_t inmsg_size = 0, outmsg_size = SMCINVOKE_TZ_MIN_BUF_SIZE;
|
||||
@@ -2847,16 +2846,11 @@ static long process_invoke_req(struct file *filp, unsigned int cmd,
|
||||
|
||||
nr_args = OBJECT_COUNTS_NUM_buffers(req.counts) +
|
||||
OBJECT_COUNTS_NUM_objects(req.counts);
|
||||
/*
|
||||
* In case nr_args is zero, allocate one buffer so that args_buf points to a valid
|
||||
* buffer. There is no need to copy anything to the buffer
|
||||
*/
|
||||
nr_args_cnt = ((nr_args > 0) ? nr_args : 1);
|
||||
|
||||
args_buf = kcalloc(nr_args_cnt, req.argsize, GFP_KERNEL);
|
||||
if (!args_buf)
|
||||
return -ENOMEM;
|
||||
if (nr_args) {
|
||||
args_buf = kcalloc(nr_args, req.argsize, GFP_KERNEL);
|
||||
if (!args_buf)
|
||||
return -ENOMEM;
|
||||
if (context_type == SMCINVOKE_OBJ_TYPE_TZ_OBJ) {
|
||||
ret = copy_from_user(args_buf,
|
||||
u64_to_user_ptr(req.args),
|
||||
@@ -3267,11 +3261,7 @@ exit_destroy_wkthread:
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
|
||||
static int smcinvoke_remove(struct platform_device *pdev)
|
||||
#else
|
||||
static void smcinvoke_remove(struct platform_device *pdev)
|
||||
#endif
|
||||
{
|
||||
int count = 1;
|
||||
|
||||
@@ -3280,9 +3270,7 @@ static void smcinvoke_remove(struct platform_device *pdev)
|
||||
device_destroy(driver_class, smcinvoke_device_no);
|
||||
class_destroy(driver_class);
|
||||
unregister_chrdev_region(smcinvoke_device_no, count);
|
||||
#if KERNEL_VERSION(6, 10, 0) > LINUX_VERSION_CODE
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int __maybe_unused smcinvoke_suspend(struct platform_device *pdev,
|
||||
|
||||
Reference in New Issue
Block a user