Re: [PATCH] mfd: replace snprintf in show functions with sysfs_emit

From: Lee Jones
Date: Thu Oct 21 2021 - 07:16:56 EST


On Thu, 14 Oct 2021, Qing Wang wrote:

> show() must not use snprintf() when formatting the value to be
> returned to user space.
>
> Fix the following coccicheck warning:
> drivers/mfd/janz-cmodio.c:157: WARNING: use scnprintf or sprintf.
>
> Use sysfs_emit instead of scnprintf or sprintf makes more sense.
>
> Signed-off-by: Qing Wang <wangqing@xxxxxxxx>
> ---
> drivers/mfd/janz-cmodio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

I've fixed the subject line for you and applied, thanks.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog