Re: [PATCH v2] drivers/ptp: Convert snprintf to sysfs_emit

From: Richard Cochran
Date: Wed Jan 24 2024 - 22:27:25 EST


On Thu, Jan 25, 2024 at 09:53:29AM +0800, Li Zhijian wrote:
> 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().
>
> > ./drivers/ptp/ptp_sysfs.c:27:8-16: WARNING: please use sysfs_emit
>
> No functional change intended

Acked-by: Richard Cochran <richardcochran@xxxxxxxxx>