[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025063046-grub-lego-59a4@gregkh>
Date: Mon, 30 Jun 2025 15:15:48 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Ryan Chung <seokwoo.chung130@...il.com>
Cc: hao.wu@...el.com, trix@...hat.com, mdf@...nel.org, yilun.xu@...el.com,
linux-fpga@...r.kernel.org, linux-kernel-mentees@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fpga: dfl: Replace scnprintf() with sysfs_emit()
On Mon, Jun 30, 2025 at 09:50:18PM +0900, Ryan Chung wrote:
> Signed-off-by: Ryan Chung <seokwoo.chung130@...il.com>
I know I can't take patches without any changelog text, but maybe other
maintainers are more lax?
Also, you only said what you did, but not why you did it.
> ---
> 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);
Did you build this? Did you test it?
> }
> 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);
Same here, was this built?
And what's wrong with the original code?
thanks,
greg k-h
Powered by blists - more mailing lists