[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220531094530.101983-1-zhangxuezhi1@coolpad.com>
Date: Tue, 31 May 2022 09:45:30 +0000
From: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
To: James.Bottomley@...senPartnership.com, martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
llyz108@....com, Xuezhi Zhang <zhangxuezhi1@...lpad.com>
Subject: [PATCH] scsi: 53c700: convert sysfs snprintf to sysfs_emit
Fix the following coccicheck warning:
drivers/scsi/53c700.c:2074:8-16:
WARNING: use scnprintf or sprintf
Signed-off-by: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
---
drivers/scsi/53c700.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index e1e4f9d10887..0406cb60916d 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -2071,7 +2071,7 @@ NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char
{
struct scsi_device *SDp = to_scsi_device(dev);
- return snprintf(buf, 20, "%d\n", NCR_700_get_depth(SDp));
+ return sysfs_emit(buf, "%d\n", NCR_700_get_depth(SDp));
}
static struct device_attribute NCR_700_active_tags_attr = {
--
2.25.1
Powered by blists - more mailing lists