From: fan <nifan.cxl@gmail.com>
To: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Cc: dan.j.williams@intel.com, ira.weiny@intel.com,
dave.jiang@intel.com, linux-cxl@vger.kernel.org
Subject: Re: [PATCH] cxl/core: use sysfs_emit() for attr's _show()
Date: Fri, 12 Jan 2024 11:47:13 -0800 [thread overview]
Message-ID: <ZaGXQeBOHdytu7wR@debian> (raw)
In-Reply-To: <20240112062709.2490947-1-ruansy.fnst@fujitsu.com>
On Fri, Jan 12, 2024 at 02:27:09PM +0800, Shiyang Ruan wrote:
> sprintf() is deprecated for sysfs, use preferred sysfs_emit() instead.
>
> Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
> ---
Reviewed-by: Fan Ni <fan.ni@samsung.com>
> drivers/cxl/core/memdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c
> index 2f43d368ba07..dae8802ecdb0 100644
> --- a/drivers/cxl/core/memdev.c
> +++ b/drivers/cxl/core/memdev.c
> @@ -114,7 +114,7 @@ static DEVICE_ATTR_RO(serial);
> static ssize_t numa_node_show(struct device *dev, struct device_attribute *attr,
> char *buf)
> {
> - return sprintf(buf, "%d\n", dev_to_node(dev));
> + return sysfs_emit(buf, "%d\n", dev_to_node(dev));
> }
> static DEVICE_ATTR_RO(numa_node);
>
> --
> 2.34.1
>
prev parent reply other threads:[~2024-01-12 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 6:27 [PATCH] cxl/core: use sysfs_emit() for attr's _show() Shiyang Ruan
2024-01-12 11:20 ` Jonathan Cameron
2024-01-12 16:19 ` Dave Jiang
2024-01-12 19:47 ` fan [this message]
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=ZaGXQeBOHdytu7wR@debian \
--to=nifan.cxl@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=ruansy.fnst@fujitsu.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