From: Liviu Dudau <liviu.dudau@arm.com>
To: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
Cc: brian.starkey@arm.com, airlied@linux.ie, daniel@ffwll.ch,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/malidp: convert sysfs snprintf to sysfs_emit
Date: Tue, 19 Apr 2022 12:14:14 +0100 [thread overview]
Message-ID: <Yl6ZhnewbrlUbWuo@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <20220417132918.135795-1-zhangxuezhi1@coolpad.com>
On Sun, Apr 17, 2022 at 01:29:18PM +0000, Xuezhi Zhang wrote:
> Fix the following coccicheck warning:
> drivers/gpu/drm/arm/malidp_drv.c:658:8-16:
> WARNING: use scnprintf or sprintf
>
> Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Thanks for this!
Best regards,
Liviu
> ---
> drivers/gpu/drm/arm/malidp_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
> index d5aef21426cf..b1ffd5ba27d9 100644
> --- a/drivers/gpu/drm/arm/malidp_drv.c
> +++ b/drivers/gpu/drm/arm/malidp_drv.c
> @@ -655,7 +655,7 @@ static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,
> struct drm_device *drm = dev_get_drvdata(dev);
> struct malidp_drm *malidp = drm->dev_private;
>
> - return snprintf(buf, PAGE_SIZE, "%08x\n", malidp->core_id);
> + return sysfs_emit(buf, "%08x\n", malidp->core_id);
> }
>
> static DEVICE_ATTR_RO(core_id);
> --
> 2.25.1
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
next prev parent reply other threads:[~2022-04-19 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-17 13:29 Xuezhi Zhang
2022-04-19 11:14 ` Liviu Dudau [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-07 13:39 Xuezhi Zhang
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=Yl6ZhnewbrlUbWuo@e110455-lin.cambridge.arm.com \
--to=liviu.dudau@arm.com \
--cc=airlied@linux.ie \
--cc=brian.starkey@arm.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhangxuezhi1@coolpad.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®