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: <e9f9969e-a1aa-a694-58ca-b18b4248e95a@amd.com>
Date:   Thu, 1 Dec 2022 11:57:40 -0500
From:   Luben Tuikov <luben.tuikov@....com>
To:     ye.xingchen@....com.cn, alexander.deucher@....com
Cc:     xinhui.pan@....com, john.clements@....com, tao.zhou1@....com,
        linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
        yipeng.chai@....com, stanley.yang@....com,
        dri-devel@...ts.freedesktop.org, christian.koenig@....com,
        hawking.zhang@....com
Subject: Re: [PATCH] drm/amdgpu: use sysfs_emit() to instead of scnprintf()

Reviewed-by: Luben Tuikov <luben.tuikov@....com>

Regards,
Luben

On 2022-11-30 21:24, ye.xingchen@....com.cn wrote:
> From: ye xingchen <ye.xingchen@....com.cn>
> 
> Replace the open-code with sysfs_emit() to simplify the code.
> 
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 077404a9c935..ad490c1e2f57 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1267,7 +1267,7 @@ static ssize_t amdgpu_ras_sysfs_features_read(struct device *dev,
>  	struct amdgpu_ras *con =
>  		container_of(attr, struct amdgpu_ras, features_attr);
> 
> -	return scnprintf(buf, PAGE_SIZE, "feature mask: 0x%x\n", con->features);
> +	return sysfs_emit(buf, "feature mask: 0x%x\n", con->features);
>  }
> 
>  static void amdgpu_ras_sysfs_remove_bad_page_node(struct amdgpu_device *adev)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ