public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH -next] drivers: soc: ti: mark knav_acc_firmwares as static
@ 2022-09-27  6:19 Chen Jiahao
  2022-10-17 22:19 ` Nishanth Menon
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Jiahao @ 2022-09-27  6:19 UTC (permalink / raw)
  To: nm, ssantosh, m-karicheri2, arnd, linux-kernel, linux-arm-kernel

There is a sparse warning shown below:

drivers/soc/ti/knav_qmss_queue.c:70:12: warning: symbol
'knav_acc_firmwares' was not declared. Should it be static?

Since 'knav_acc_firmwares' is only called within knav_qmss_queue.c,
mark it as static to fix the warning.

Fixes: 96ee19becc3b ("soc: ti: add firmware file name as part of the driver")
Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
---
 drivers/soc/ti/knav_qmss_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 92af7d1b6f5b..c466b98a0293 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -67,7 +67,7 @@ static DEFINE_MUTEX(knav_dev_lock);
  * Newest followed by older ones. Search is done from start of the array
  * until a firmware file is found.
  */
-const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin"};
+static const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin"};
 
 static bool device_ready;
 bool knav_qmss_device_ready(void)
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] drivers: soc: ti: mark knav_acc_firmwares as static
  2022-09-27  6:19 [PATCH -next] drivers: soc: ti: mark knav_acc_firmwares as static Chen Jiahao
@ 2022-10-17 22:19 ` Nishanth Menon
  2022-10-19  7:24   ` chenjiahao (C)
  0 siblings, 1 reply; 3+ messages in thread
From: Nishanth Menon @ 2022-10-17 22:19 UTC (permalink / raw)
  To: Chen Jiahao; +Cc: ssantosh, m-karicheri2, arnd, linux-kernel, linux-arm-kernel

On 14:19-20220927, Chen Jiahao wrote:
> There is a sparse warning shown below:
> 
> drivers/soc/ti/knav_qmss_queue.c:70:12: warning: symbol
> 'knav_acc_firmwares' was not declared. Should it be static?
> 
> Since 'knav_acc_firmwares' is only called within knav_qmss_queue.c,
> mark it as static to fix the warning.
> 
> Fixes: 96ee19becc3b ("soc: ti: add firmware file name as part of the driver")
> Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
> ---
>  drivers/soc/ti/knav_qmss_queue.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
> index 92af7d1b6f5b..c466b98a0293 100644
> --- a/drivers/soc/ti/knav_qmss_queue.c
> +++ b/drivers/soc/ti/knav_qmss_queue.c
> @@ -67,7 +67,7 @@ static DEFINE_MUTEX(knav_dev_lock);
>   * Newest followed by older ones. Search is done from start of the array
>   * until a firmware file is found.
>   */
> -const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin"};
> +static const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin"};

next-20221017 checkpatch suggests:

static const char * array should probably be static const char * const

Could you check to ensure we are clear here?
>  
>  static bool device_ready;
>  bool knav_qmss_device_ready(void)
> -- 
> 2.31.1
> 

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] drivers: soc: ti: mark knav_acc_firmwares as static
  2022-10-17 22:19 ` Nishanth Menon
@ 2022-10-19  7:24   ` chenjiahao (C)
  0 siblings, 0 replies; 3+ messages in thread
From: chenjiahao (C) @ 2022-10-19  7:24 UTC (permalink / raw)
  To: Nishanth Menon
  Cc: ssantosh, m-karicheri2, arnd, linux-kernel, linux-arm-kernel


在 2022/10/18 6:19, Nishanth Menon 写道:
> On 14:19-20220927, Chen Jiahao wrote:
>> There is a sparse warning shown below:
>>
>> drivers/soc/ti/knav_qmss_queue.c:70:12: warning: symbol
>> 'knav_acc_firmwares' was not declared. Should it be static?
>>
>> Since 'knav_acc_firmwares' is only called within knav_qmss_queue.c,
>> mark it as static to fix the warning.
>>
>> Fixes: 96ee19becc3b ("soc: ti: add firmware file name as part of the driver")
>> Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
>> ---
>>   drivers/soc/ti/knav_qmss_queue.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
>> index 92af7d1b6f5b..c466b98a0293 100644
>> --- a/drivers/soc/ti/knav_qmss_queue.c
>> +++ b/drivers/soc/ti/knav_qmss_queue.c
>> @@ -67,7 +67,7 @@ static DEFINE_MUTEX(knav_dev_lock);
>>    * Newest followed by older ones. Search is done from start of the array
>>    * until a firmware file is found.
>>    */
>> -const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin"};
>> +static const char *knav_acc_firmwares[] = {"ks2_qmss_pdsp_acc48.bin"};
> next-20221017 checkpatch suggests:
>
> static const char * array should probably be static const char * const
>
> Could you check to ensure we are clear here?

Sure, it is safe to mark 'knav_acc_firmwares' as static const char * const.

Thanks for your reminder

>>   
>>   static bool device_ready;
>>   bool knav_qmss_device_ready(void)
>> -- 
>> 2.31.1
>>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-19  7:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-27  6:19 [PATCH -next] drivers: soc: ti: mark knav_acc_firmwares as static Chen Jiahao
2022-10-17 22:19 ` Nishanth Menon
2022-10-19  7:24   ` chenjiahao (C)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox