Re: [PATCH v2 3/3] wifi: ti: Convert sprintf/snprintf to sysfs_emit

From: Kalle Valo
Date: Mon Mar 18 2024 - 06:05:18 EST


"Zhijian Li (Fujitsu)" <lizhijian@xxxxxxxxxxx> writes:

> Kalle,
>
>
> On 18/03/2024 17:16, Kalle Valo wrote:
>> Li Zhijian <lizhijian@xxxxxxxxxxx> writes:
>>
>>> Per filesystems/sysfs.rst, show() should only use sysfs_emit()
>>> or sysfs_emit_at() when formatting the value to be returned to user space.
>>>
>>> coccinelle complains that there are still a couple of functions that use
>>> snprintf(). Convert them to sysfs_emit().
>>>
>>> sprintf() will be converted as weel if they have.
>>>
>>> Generally, this patch is generated by
>>> make coccicheck M=<path/to/file> MODE=patch \
>>> COCCI=scripts/coccinelle/api/device_attr_show.cocci
>>>
>>> No functional change intended
>>>
>>> CC: Kalle Valo <kvalo@xxxxxxxxxx>
>>> CC: linux-wireless@xxxxxxxxxxxxxxx
>>> Signed-off-by: Li Zhijian <lizhijian@xxxxxxxxxxx>
>>> ---
>>> V2: subject updated
>>>
>>> This is a part of the work "Fix coccicheck device_attr_show warnings"[1]
>>> Split them per subsystem so that the maintainer can review it easily
>>> [1] https://lore.kernel.org/lkml/20240116041129.3937800-1-lizhijian@xxxxxxxxxxx/
>>> Signed-off-by: Li Zhijian <lizhijian@xxxxxxxxxxx>
>>
>> Please resubmit the whole patchset as v3.
>
>
> May I know what's wrong with this V2? or what update should I do in V3

Sorry, my mistake. I didn't see patch 1 and I assumed it was not sent.
But I checked patchwork now and I do see all three patches:

https://patchwork.kernel.org/project/linux-wireless/list/?series=835497

So no need to resend anything because of this.

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches