From: Thorsten Blum <thorsten.blum@linux.dev>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Prasanth Ksr <prasanth.ksr@dell.com>,
Hans de Goede <hansg@kernel.org>,
Dell.Client.Kernel@dell.com, platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: dell-wmi-sysman: Use sysfs_emit{_at} in show functions
Date: Thu, 5 Mar 2026 14:00:02 +0100 [thread overview]
Message-ID: <27DCD6B0-3DDC-4FDB-BE29-873465FAD236@linux.dev> (raw)
In-Reply-To: <77f08627-cb28-8c0e-112b-f7ebef5a9a74@linux.intel.com>
On 5. Mar 2026, at 13:48, Ilpo Järvinen wrote:
> On Thu, 5 Mar 2026, Thorsten Blum wrote:
>> Replace sprintf() with sysfs_emit() and sysfs_emit_at() in sysfs show
>> functions. sysfs_emit() and sysfs_emit_at() are preferred for formatting
>> sysfs output because they provide safer bounds checking.
>>
>> In reset_bios_show(), use sysfs_emit_at() to avoid manual buffer size
>> accounting.
>>
>> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
>> ---
>> .../platform/x86/dell/dell-wmi-sysman/sysman.c | 18 ++++++++----------
>> 1 file changed, 8 insertions(+), 10 deletions(-)
>> [...]
>> + for (i = 0; i < MAX_TYPES; i++)
>> + len += sysfs_emit_at(buf, len, i == reset_option ? "[%s] " : "%s ",
>
> Are all checkers okay with this construct? IIRC something doesn't
> like having such logic in where only a formatting string is expected.
You mean checkpatch? No warnings, but I can split it again if needed.
Thanks,
Thorsten
next prev parent reply other threads:[~2026-03-05 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 12:41 [PATCH] platform/x86: dell-wmi-sysman: Use sysfs_emit{_at} in show functions Thorsten Blum
2026-03-05 12:48 ` Ilpo Järvinen
2026-03-05 13:00 ` Thorsten Blum [this message]
2026-03-05 13:10 ` Ilpo Järvinen
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=27DCD6B0-3DDC-4FDB-BE29-873465FAD236@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=Dell.Client.Kernel@dell.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=prasanth.ksr@dell.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 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.