Re: [PATCH] drivers:zorro:zorro-sysfs.c Replace sprintf() with sysfs_emit()

From: Greg KH
Date: Tue Jul 22 2025 - 01:53:52 EST


On Tue, Jul 22, 2025 at 09:09:08AM +0530, Rujra Bhatt wrote:
> Reply-To:

Why is this here?

>
> replace sprintf() with sysfs_emit() in sysfs
> *_show() functions in zorro-sysfs.c to follow the kernel's guidelines
> from Documentation/filesystems/sysfs.rst.
>
> This improves consistency, safety, and makes the code easier to
> maintain and update in the future.

No, not really. For new code, always use sysfs_emit(). For existing
code, that you can not even test, just leave it alone unless you can
prove it is wrong.

This code looks fine as-is. No need to change it unless you really want
to, but there is no requriement.

thanks,

greg k-h