Re: [PATCH] scsi: mpt3sas: use sysfs_emit function in sysfs

From: Martin K. Petersen

Date: Sat Nov 08 2025 - 12:54:14 EST



Shi,

> Replace snprintf() with sysfs_emit() function as it removes
> unnecessary use cases of PAGE_SIZE also it is much preferred for sysfs
> functions. This conversion makes code more maintainable and follows
> current kernel code guidelines.

>From Documentation/filesystems/sysfs.rst:

- New implementations of show() methods should only use sysfs_emit() or
sysfs_emit_at() when formatting the value to be returned to user space.

mpt3sas is not a "new implementation".

--
Martin K. Petersen