Skip to contentSkip to conversation

scsi: fixup coccinelle warnings

PATCH New [email protected] 1 participant 1 message Nov 1, 2021 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: fixup coccinelle warnings

From: chi minghao <[email protected]>

Use sysfs_emit instead of scnprintf or sprintf makes more sense.

---
 drivers/scsi/ncr53c8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ncr53c8xx.c +1 -1
index fc8abe05fa8f..135a0a112dbb 100644
@@ -8031,7 +8031,7 @@ static ssize_t show_ncr53c8xx_revision(struct device *dev,
 	struct Scsi_Host *host = class_to_shost(dev);
 	struct host_data *host_data = (struct host_data *)host->hostdata;
 
-	return snprintf(buf, 20, "0x%x\n", host_data->ncb->revision_id);
+	return sysfs_emit(buf, "0x%x\n", host_data->ncb->revision_id);
 }
 
 static struct device_attribute ncr53c8xx_revision_attr = {
Signature · 1 line
2.25.1