* Fwd: [PATCH] scsi: isci: Convert snprintf() to sysfs_emit()
[not found] <tencent_9AA2345A885AECF32201BDEABACAB9F12707@qq.com>
@ 2023-07-13 6:45 ` hanyu001
0 siblings, 0 replies; only message in thread
From: hanyu001 @ 2023-07-13 6:45 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linux-kernel, linux-scsi
Coccinnelle reports a warning
Warning: Use scnprintf or sprintf
WARNING: use scnprintf or sprintf
Signed-off-by: ztt <1549089851@qq.com>
---
drivers/scsi/isci/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index ac1e04b86d8f..5ce24fc7f940 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -137,7 +137,7 @@ static ssize_t isci_show_id(struct device *dev,
struct device_attribute *attr, c
struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost);
struct isci_host *ihost = container_of(sas_ha, typeof(*ihost),
sas_ha);
- return snprintf(buf, PAGE_SIZE, "%d\n", ihost->id);
+ return scnprintf(buf, PAGE_SIZE, "%d\n", ihost->id);
}
static DEVICE_ATTR(isci_id, S_IRUGO, isci_show_id, NULL);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-13 6:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <tencent_9AA2345A885AECF32201BDEABACAB9F12707@qq.com>
2023-07-13 6:45 ` Fwd: [PATCH] scsi: isci: Convert snprintf() to sysfs_emit() hanyu001
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®