mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [PATCH 5.12/scsi-staging] scsi: ufs: convert sysfs sprintf/snprintf family to sysfs_emit
@ 2021-02-09  9:00 Jiapeng Chong
  0 siblings, 0 replies; only message in thread
From: Jiapeng Chong @ 2021-02-09  9:00 UTC (permalink / raw)
  To: alim.akhtar
  Cc: avri.altman, jejb, martin.petersen, linux-scsi, linux-kernel,
	Jiapeng Chong

Fix the following coccicheck warning:

./drivers/scsi/ufs/ufshcd.c:1838:8-16: WARNING: use scnprintf or
sprintf.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/scsi/ufs/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 80620c8..a340c77 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1535,7 +1535,7 @@ static ssize_t ufshcd_clkscale_enable_show(struct device *dev,
 {
 	struct ufs_hba *hba = dev_get_drvdata(dev);
 
-	return snprintf(buf, PAGE_SIZE, "%d\n", hba->clk_scaling.is_enabled);
+	return sysfs_emit(buf, "%d\n", hba->clk_scaling.is_enabled);
 }
 
 static ssize_t ufshcd_clkscale_enable_store(struct device *dev,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-09  9:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09  9:00 [PATCH] [PATCH 5.12/scsi-staging] scsi: ufs: convert sysfs sprintf/snprintf family to sysfs_emit Jiapeng Chong

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®