[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211101021905.34659-1-chi.minghao@zte.com.cn>
Date: Mon, 1 Nov 2021 02:19:05 +0000
From: cgel.zte@...il.com
To: jejb@...ux.ibm.com
Cc: martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, chi minghao <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] scsi: fixup coccinelle warnings
From: chi minghao <chi.minghao@....com.cn>
Use sysfs_emit instead of scnprintf or sprintf makes more sense.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: chi minghao <chi.minghao@....com.cn>
---
drivers/scsi/ncr53c8xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
index fc8abe05fa8f..135a0a112dbb 100644
--- a/drivers/scsi/ncr53c8xx.c
+++ b/drivers/scsi/ncr53c8xx.c
@@ -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 = {
--
2.25.1
Powered by blists - more mailing lists