lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 19 Oct 2022 15:24:46 +0800
From:   "chenjiahao (C)" <chenjiahao16@...wei.com>
To:     Nishanth Menon <nm@...com>
CC:     <ssantosh@...nel.org>, <m-karicheri2@...com>, <arnd@...db.de>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH -next] drivers: soc: ti: mark knav_acc_firmwares as static


在 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@...wei.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
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ