lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <92bf6914-1fa8-124e-69c9-36cb31586e0a@linux.intel.com>
Date: Fri, 17 Jan 2025 19:01:48 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Ai Chao <aichao@...inos.cn>
cc: Hans de Goede <hdegoede@...hat.com>, vadimp@...dia.com, 
    platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/mellanox: mlxreg-io: use sysfs_emit() instead
 of sprintf()

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@...inos.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);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ