mbox series

[-next,0/3] Use sysfs_emit for reloading sysfs's .show

Message ID 20240904013540.2026972-1-lihongbo22@huawei.com
Headers show
Series Use sysfs_emit for reloading sysfs's .show | expand

Message

Hongbo Li Sept. 4, 2024, 1:35 a.m. UTC
Now as the latest Documentation/filesystems/sysfs.rst
suggested, show() should only use sysfs_emit() or
sysfs_emit_at() when formatting the value to be returned
to user space.

sysfs_emit validates assumptions made by sysfs and is the
correct mechanism to format data for sysfs. So we can do
these conversion.

Hongbo Li (3):
  scsi: pmcraid: change snprintf() to sysfs_emit()
  scsi: aacraid: Use sysfs_emit() to replace the sprintf()
  scsi: hptiop: Change snprintf() to sysfs_emit()

 drivers/scsi/aacraid/linit.c | 14 ++++++--------
 drivers/scsi/hptiop.c        |  4 ++--
 drivers/scsi/pmcraid.c       | 10 ++++------
 3 files changed, 12 insertions(+), 16 deletions(-)