From: Greg KH <gregkh@linuxfoundation.org>
To: Ryan Chung <seokwoo.chung130@gmail.com>
Cc: hao.wu@intel.com, trix@redhat.com, mdf@kernel.org,
yilun.xu@intel.com, linux-fpga@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fpga: dfl: Replace scnprintf() with sysfs_emit()
Date: Mon, 30 Jun 2025 15:15:48 +0200 [thread overview]
Message-ID: <2025063046-grub-lego-59a4@gregkh> (raw)
In-Reply-To: <20250630125018.48417-1-seokwoo.chung130@gmail.com>
On Mon, Jun 30, 2025 at 09:50:18PM +0900, Ryan Chung wrote:
> Signed-off-by: Ryan Chung <seokwoo.chung130@gmail.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
next prev parent reply other threads:[~2025-06-30 13:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 12:50 [PATCH] fpga: dfl: Replace scnprintf() with sysfs_emit() Ryan Chung
2025-06-30 13:15 ` Greg KH [this message]
2025-07-01 4:09 ` kernel test robot
2025-07-01 4:30 ` kernel test robot
2025-07-01 11:02 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025063046-grub-lego-59a4@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=seokwoo.chung130@gmail.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox