From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tomasz Unger <tomasz.unger@yahoo.pl>
Cc: Rui Miguel Silva <rmfrfs@gmail.com>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: use sysfs_emit instead of sprintf in light.c
Date: Tue, 1 Sep 2026 12:06:24 +0200 [thread overview]
Message-ID: <2026090110-storewide-briar-b062@gregkh> (raw)
In-Reply-To: <20260819-greybus-light-sysfs-emit-v1-1-43c4b680de6a@yahoo.pl>
On Wed, Aug 19, 2026 at 05:44:55PM +0200, Tomasz Unger wrote:
> Per Documentation/filesystems/sysfs.rst, new implementations of
> show() methods should only use sysfs_emit() or sysfs_emit_at()
> when formatting the value to be returned to user space, since it
> is aware of the sysfs PAGE_SIZE buffer and includes sanity checks
> that sprintf() lacks.
>
> This fixes fade_in_show() and fade_out_show() (both generated by
> the gb_lights_fade_attr() macro) and color_show().
>
> Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl>
> ---
> Verified with checkpatch.pl - no errors or warnings.
> Compiled the gb-light module successfully with CONFIG_GREYBUS_LIGHT=m
> and CONFIG_LEDS_CLASS_FLASH=m (both previously disabled).
> greybus.ko, led-class-flash.ko and gb-light.ko all load without
> errors in a QEMU environment (verified via insmod and lsmod, dmesg
> shows no errors). This confirms the modules load cleanly but does
> not exercise the changed sysfs show() code paths, which would
> require an actual Greybus light device bound to the driver.
> ---
> drivers/staging/greybus/light.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Please see the archives for why this patch has been rejected in the
past.
sorry,
greg k-h
prev parent reply other threads:[~2026-09-01 10:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260819-greybus-light-sysfs-emit-v1-1-43c4b680de6a.ref@yahoo.pl>
2026-08-19 15:44 ` [PATCH] staging: greybus: use sysfs_emit instead of sprintf in light.c Tomasz Unger
2026-09-01 10:06 ` Greg Kroah-Hartman [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=2026090110-storewide-briar-b062@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=rmfrfs@gmail.com \
--cc=tomasz.unger@yahoo.pl \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.