linux/drivers/scsi/snic
Li Zhijian eab302e89f scsi: snic: Convert sprintf() family to sysfs_emit() family
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().

sprintf() and scnprintf() will be converted as well if they have.

Generally, this patch is generated by
make coccicheck M=<path/to/file> MODE=patch \
COCCI=scripts/coccinelle/api/device_attr_show.cocci

No functional change intended

CC: Karan Tilak Kumar <kartilak@cisco.com>
CC: Sesidhar Baddela <sebaddel@cisco.com>
CC: James E.J. Bottomley <jejb@linux.ibm.com>
CC: Martin K. Petersen <martin.petersen@oracle.com>
CC: linux-scsi@vger.kernel.org
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Link: https://lore.kernel.org/r/20240319063132.1588443-12-lizhijian@fujitsu.com
Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-04-08 22:04:32 -04:00
..
cq_desc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1) 2022-06-10 14:51:36 +02:00
cq_enet_desc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1) 2022-06-10 14:51:36 +02:00
Makefile
snic_attrs.c scsi: snic: Convert sprintf() family to sysfs_emit() family 2024-04-08 22:04:32 -04:00
snic_ctl.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_debugfs.c scsi: snic: Fix memory leak with using debugfs_lookup() 2023-02-08 18:49:59 -05:00
snic_disc.c scsi: snic: Fix double free in snic_tgt_create() 2023-08-24 22:30:32 -04:00
snic_disc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_fwint.h SCSI misc on 20220804 2022-08-04 19:47:37 -07:00
snic_io.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_isr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_main.c scsi: snic: Declare SCSI host template const 2023-03-24 19:19:59 -04:00
snic_res.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_res.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_scsi.c scsi: snic: Remove useless code in snic_dr_clean_pending_req() 2023-10-24 22:33:02 -04:00
snic_stats.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_trc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic_trc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
snic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1) 2022-06-10 14:51:36 +02:00
vnic_cq_fw.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_cq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_cq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_dev.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_dev.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_devcmd.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_intr.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_intr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_resource.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_snic.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_stats.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_wq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
vnic_wq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00
wq_enet_desc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) 2022-06-10 14:51:36 +02:00