Re: [PATCH] misc: ad525x_dpot: Use str_enabled_disabled() in sysfs_show_reg()
From: Thorsten Blum
Date: Wed Aug 20 2025 - 17:46:46 EST
On 20. Aug 2025, at 13:15, Greg Kroah-Hartman wrote:
> On Wed, Aug 20, 2025 at 12:27:34PM +0200, Thorsten Blum wrote:
>> Remove hard-coded strings by using the str_enabled_disabled() helper
>> function and silence the following Coccinelle/coccicheck warning
>> reported by string_choices.cocci:
>>
>> opportunity for str_enabled_disabled(..)
>>
>> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
>> ---
>
> If you are going to change this, might as well call sysfs_emit() as
> well, right?
I guess, but probably in another patch because it's two separate things?
> that way you get two coccicheck warnings at once :)
I didn't look into it, but device_attr_show.cocci doesn't produce any
warnings for drivers/misc/* (at least not for me).
Thanks,
Thorsten