From: Helge Deller <deller@gmx.de>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] fbdev: omapfb: Use sysfs_emit_at() to simplify code
Date: Wed, 28 Aug 2024 20:08:32 +0200 [thread overview]
Message-ID: <d60d6c37-3726-477c-8d69-5b49be8c921c@gmx.de> (raw)
In-Reply-To: <fa1c03aded0c36585d29991d85d083853c3ca871.1723119220.git.christophe.jaillet@wanadoo.fr>
On 8/8/24 14:14, Christophe JAILLET wrote:
> This file already uses sysfs_emit(). So be consistent and also use
> sysfs_emit_at().
>
> Moreover, size is always < PAGE_SIZE because scnprintf() (and now
> sysfs_emit_at()) returns the number of characters written not including the
> trailing '\0'. So some tests can be removed.
>
> This slightly simplifies the code and makes it more readable.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only.
>
> 2 spaces are added before color_caps[i].name and color_caps[i].name, but
> not ctrl_caps[i].name.
> I wonder if it is done on purpose or if it could be removed as well.
> ---
> drivers/video/fbdev/omap/omapfb_main.c | 36 ++++++++++----------------
> 1 file changed, 14 insertions(+), 22 deletions(-)
applied.
Thanks!
Helge
prev parent reply other threads:[~2024-08-28 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 12:14 [PATCH] fbdev: omapfb: Use sysfs_emit_at() to simplify code Christophe JAILLET
2024-08-08 13:15 ` Andi Shyti
2024-08-28 18:08 ` Helge Deller [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=d60d6c37-3726-477c-8d69-5b49be8c921c@gmx.de \
--to=deller@gmx.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
/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 NNTP newsgroup(s).