From 523936616768af9e8bd47629ca15099c8d99e7a6 Mon Sep 17 00:00:00 2001 From: Hexuan Zhu Date: Mon, 30 Aug 2021 16:57:19 +0800 Subject: [PATCH] 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 --- dsp/audio_calibration.c | 8 ++++---- include/ipc/apr.h | 3 ++- ipc/apr.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) mode change 100644 => 100755 dsp/audio_calibration.c mode change 100644 => 100755 include/ipc/apr.h diff --git a/dsp/audio_calibration.c b/dsp/audio_calibration.c old mode 100644 new mode 100755 index 854d882191f6..c2fb702fbde3 --- a/dsp/audio_calibration.c +++ b/dsp/audio_calibration.c @@ -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 #include @@ -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, diff --git a/include/ipc/apr.h b/include/ipc/apr.h old mode 100644 new mode 100755 index 40fc92c7d8d3..707c2f10380e --- a/include/ipc/apr.h +++ b/include/ipc/apr.h @@ -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 diff --git a/ipc/apr.c b/ipc/apr.c index 37d559a12afd..25a052014de6 100755 --- a/ipc/apr.c +++ b/ipc/apr.c @@ -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 @@ -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);