linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fpga: dfl: Replace scnprintf() with sysfs_emit()
@ 2025-06-30 12:50 Ryan Chung
  2025-06-30 13:15 ` Greg KH
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ryan Chung @ 2025-06-30 12:50 UTC (permalink / raw)
  To: hao.wu, trix, mdf, yilun.xu
  Cc: linux-fpga, linux-kernel-mentees, linux-kernel, Ryan Chung

Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.com>
---
 drivers/fpga/dfl-afu-main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/fpga/dfl-afu-main.c b/drivers/fpga/dfl-afu-main.c
index 3bf8e7338dbe..f2dd4667a43d 100644
--- a/drivers/fpga/dfl-afu-main.c
+++ b/drivers/fpga/dfl-afu-main.c
@@ -156,7 +156,7 @@ id_show(struct device *dev, struct device_attribute *attr, char *buf)
 	struct dfl_feature_dev_data *fdata = to_dfl_feature_dev_data(dev);
 	int id = port_get_id(fdata);
 
-	return scnprintf(buf, PAGE_SIZE, "%d\n", id);
+	return sysfs_emit(buf, PAGE_SIZE, "%d\n", id);
 }
 static DEVICE_ATTR_RO(id);
 
@@ -475,7 +475,7 @@ afu_id_show(struct device *dev, struct device_attribute *attr, char *buf)
 	guidh = readq(base + GUID_H);
 	mutex_unlock(&fdata->lock);
 
-	return scnprintf(buf, PAGE_SIZE, "%016llx%016llx\n", guidh, guidl);
+	return sysfs_emit(buf, PAGE_SIZE, "%016llx%016llx\n", guidh, guidl);
 }
 static DEVICE_ATTR_RO(afu_id);
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-01 11:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 12:50 [PATCH] fpga: dfl: Replace scnprintf() with sysfs_emit() Ryan Chung
2025-06-30 13:15 ` Greg KH
2025-07-01  4:09 ` kernel test robot
2025-07-01  4:30 ` kernel test robot
2025-07-01 11:02 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).