mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luben Tuikov <luben.tuikov@amd.com>
To: ye.xingchen@zte.com.cn, alexander.deucher@amd.com
Cc: xinhui.pan@amd.com, john.clements@amd.com, tao.zhou1@amd.com,
	linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	yipeng.chai@amd.com, stanley.yang@amd.com,
	dri-devel@lists.freedesktop.org, christian.koenig@amd.com,
	hawking.zhang@amd.com
Subject: Re: [PATCH] drm/amdgpu: use sysfs_emit() to instead of scnprintf()
Date: Thu, 1 Dec 2022 11:57:40 -0500	[thread overview]
Message-ID: <e9f9969e-a1aa-a694-58ca-b18b4248e95a@amd.com> (raw)
In-Reply-To: <202212011024212258022@zte.com.cn>

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

Regards,
Luben

On 2022-11-30 21:24, ye.xingchen@zte.com.cn wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Replace the open-code with sysfs_emit() to simplify the code.
> 
> Signed-off-by: ye xingchen <ye.xingchen@zte.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)


      reply	other threads:[~2022-12-01 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  2:24 ye.xingchen
2022-12-01 16:57 ` Luben Tuikov [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=e9f9969e-a1aa-a694-58ca-b18b4248e95a@amd.com \
    --to=luben.tuikov@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hawking.zhang@amd.com \
    --cc=john.clements@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stanley.yang@amd.com \
    --cc=tao.zhou1@amd.com \
    --cc=xinhui.pan@amd.com \
    --cc=ye.xingchen@zte.com.cn \
    --cc=yipeng.chai@amd.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®