dsp: Fix audiodlkm sparse warning issue

To resolve sparse warnings due to kernel downstream changes,
we need to fix audio-kernel sparse warning.

Change-Id: I5ecd30f6fa818c0e290c61f6157246770ca47b74
Signed-off-by: Hexuan Zhu <hexuzhu@codeaurora.org>
This commit is contained in:
Hexuan Zhu 2021-08-30 16:57:19 +08:00
parent 9c87b94c10
commit 5239366167
3 changed files with 8 additions and 7 deletions

8
dsp/audio_calibration.c Normal file → Executable file
View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2014, 2016-2017, 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2014, 2016-2017, 2020-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/slab.h>
#include <linux/fs.h>
@ -409,7 +409,7 @@ static long audio_cal_shared_ioctl(struct file *file, unsigned int cmd,
goto done;
}
if (copy_from_user(&size, (void *)arg, sizeof(size))) {
if (copy_from_user(&size, arg, sizeof(size))) {
pr_err("%s: Could not copy size value from user\n", __func__);
ret = -EFAULT;
goto done;
@ -426,7 +426,7 @@ static long audio_cal_shared_ioctl(struct file *file, unsigned int cmd,
if (data == NULL) {
ret = -ENOMEM;
goto done;
} else if (copy_from_user(data, (void *)arg, size)) {
} else if (copy_from_user(data, arg, size)) {
pr_err("%s: Could not copy data from user\n",
__func__);
ret = -EFAULT;
@ -579,7 +579,7 @@ static const struct file_operations audio_cal_fops = {
#endif
};
struct miscdevice audio_cal_misc = {
static struct miscdevice audio_cal_misc = {
.minor = MISC_DYNAMIC_MINOR,
.name = "msm_audio_cal",
.fops = &audio_cal_fops,

3
include/ipc/apr.h Normal file → Executable file
View File

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2010-2017, 2019, 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2010-2017, 2019-2021, The Linux Foundation. All rights reserved.
*/
#ifndef __APR_H_
#define __APR_H_
@ -195,4 +195,5 @@ uint16_t apr_get_reset_domain(uint16_t proc);
int apr_start_rx_rt(void *handle);
int apr_end_rx_rt(void *handle);
void apr_register_adsp_state_cb(void *adsp_cb, void *client_handle);
int apr_pkt_config(void *handle, struct apr_pkt_cfg *cfg);
#endif

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2010-2014, 2016-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2010-2014, 2016-2021 The Linux Foundation. All rights reserved.
*/
#include <linux/kernel.h>
@ -248,7 +248,7 @@ void apr_set_modem_state(enum apr_subsys_state state)
}
EXPORT_SYMBOL(apr_set_modem_state);
enum apr_subsys_state apr_cmpxchg_modem_state(enum apr_subsys_state prev,
static enum apr_subsys_state apr_cmpxchg_modem_state(enum apr_subsys_state prev,
enum apr_subsys_state new)
{
return atomic_cmpxchg(&q6.modem_state, prev, new);