From: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Sam Ravnborg <sam@ravnborg.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Helge Deller <deller@gmx.de>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm,fbdev: td043mtea1: Convert sprintf() family to sysfs_emit() family
Date: Tue, 19 Mar 2024 04:00:30 +0000 [thread overview]
Message-ID: <6ea07a1e-39ca-42d8-85fe-a03f388a8d2e@fujitsu.com> (raw)
In-Reply-To: <20240319034310.1574349-1-lizhijian@fujitsu.com>
On 19/03/2024 11:43, Li Zhijian wrote:
> diff --git
> a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> index 477789cff8e0..040a17a05baa 100644
> --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> @@ -228,14 +228,10 @@ static ssize_t tpo_td043_gamma_show(struct device
> *dev,
> int ret;
> int i;
>
> - for (i = 0; i < ARRAY_SIZE(ddata->gamma); i++) {
> - ret = snprintf(buf + len, PAGE_SIZE - len, "%u ",
> - ddata->gamma[i]);
> - if (ret < 0)
> - return ret;
> - len += ret;
> - }
> - buf[len - 1] = '\n';
> + for (i = 0; i < ARRAY_SIZE(ddata->gamma); i++)
> + len = sysfs_emit_at(buf, len, "%u ", ddata->gamma[i]);
It should be
len += sysfs_emit_at(buf, len, "%u ", ddata->gamma[i]);
just posted V2 to fix this.
Thanks
Zhijian
> + if (len)
> + buf[len - 1] = '\n';
>
prev parent reply other threads:[~2024-03-19 4:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 3:43 [PATCH] drm,fbdev: td043mtea1: Convert sprintf() family to sysfs_emit() family Li Zhijian
2024-03-19 4:00 ` Zhijian Li (Fujitsu) [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=6ea07a1e-39ca-42d8-85fe-a03f388a8d2e@fujitsu.com \
--to=lizhijian@fujitsu.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).