mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Ai Chao <aichao@kylinos.cn>
Cc: Hans de Goede <hdegoede@redhat.com>,
	vadimp@nvidia.com,  platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/mellanox: mlxreg-io: use sysfs_emit() instead of sprintf()
Date: Fri, 17 Jan 2025 19:01:48 +0200 (EET)	[thread overview]
Message-ID: <92bf6914-1fa8-124e-69c9-36cb31586e0a@linux.intel.com> (raw)
In-Reply-To: <20250116081129.2902274-1-aichao@kylinos.cn>

On Thu, 16 Jan 2025, Ai Chao wrote:

> Follow the advice in Documentation/filesystems/sysfs.rst:
> show() should only use sysfs_emit() or sysfs_emit_at() when formatting
> the value to be returned to user space.
> 
> Signed-off-by: Ai Chao <aichao@kylinos.cn>

Hi,

I've now applied these 3 into the review-ilpo-next branch. Next time, 
however, please make a patch series out of cleanups of same kind so it'll 
be easier for me to handle them as a single set of patches. Thank you.

-- 
 i.

> ---
>  drivers/platform/mellanox/mlxreg-io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/mellanox/mlxreg-io.c b/drivers/platform/mellanox/mlxreg-io.c
> index 595276206baf..97fefe6c38d1 100644
> --- a/drivers/platform/mellanox/mlxreg-io.c
> +++ b/drivers/platform/mellanox/mlxreg-io.c
> @@ -126,7 +126,7 @@ mlxreg_io_attr_show(struct device *dev, struct device_attribute *attr,
>  
>  	mutex_unlock(&priv->io_lock);
>  
> -	return sprintf(buf, "%u\n", regval);
> +	return sysfs_emit(buf, "%u\n", regval);
>  
>  access_error:
>  	mutex_unlock(&priv->io_lock);
> 

      parent reply	other threads:[~2025-01-17 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16  8:11 Ai Chao
2025-01-16  9:03 ` Vadim Pasternak
2025-01-17 17:01 ` Ilpo Järvinen [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=92bf6914-1fa8-124e-69c9-36cb31586e0a@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=aichao@kylinos.cn \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=vadimp@nvidia.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

all inboxes | Powered by JetHome®