From: Greg KH <gregkh@linuxfoundation.org>
To: Rujra Bhatt <braker.noob.kernel@gmail.com>
Cc: geert@linux-m68k.org, linux-m68k@lists.linux-m68k.org,
linux-kernel@vger.kernel.org, skhan@linuxfoundation.org,
linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH] drivers:zorro:zorro-sysfs.c Replace sprintf() with sysfs_emit()
Date: Tue, 22 Jul 2025 07:53:39 +0200 [thread overview]
Message-ID: <2025072228-comfy-germproof-578d@gregkh> (raw)
In-Reply-To: <aH8H3D0WRrqqZYc4@brak3rDesk>
On Tue, Jul 22, 2025 at 09:09:08AM +0530, Rujra Bhatt wrote:
> Reply-To:
Why is this here?
>
> replace sprintf() with sysfs_emit() in sysfs
> *_show() functions in zorro-sysfs.c to follow the kernel's guidelines
> from Documentation/filesystems/sysfs.rst.
>
> This improves consistency, safety, and makes the code easier to
> maintain and update in the future.
No, not really. For new code, always use sysfs_emit(). For existing
code, that you can not even test, just leave it alone unless you can
prove it is wrong.
This code looks fine as-is. No need to change it unless you really want
to, but there is no requriement.
thanks,
greg k-h
prev parent reply other threads:[~2025-07-22 5:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 3:39 [PATCH] drivers:zorro:zorro-sysfs.c Replace sprintf() with sysfs_emit() Rujra Bhatt
2025-07-22 5:53 ` Greg KH [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=2025072228-comfy-germproof-578d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=braker.noob.kernel@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=skhan@linuxfoundation.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).