public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Pranav Tyagi <pranav.tyagi03@gmail.com>
Cc: linux-kernel@vger.kernel.org, chentao@kylinos.cn,
	skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH] firmware/memmap: use scnprintf() in show funcs
Date: Tue, 1 Jul 2025 12:27:38 +0200	[thread overview]
Message-ID: <2025070154-cringe-tidings-20f5@gregkh> (raw)
In-Reply-To: <20250613134449.7459-1-pranav.tyagi03@gmail.com>

On Fri, Jun 13, 2025 at 07:14:49PM +0530, Pranav Tyagi wrote:
> Replace all snprintf() instances with scnprintf(). snprintf() returns
> the number of bytes that would have been written had there been enough
> space. For sysfs attributes, snprintf() should not be used for the
> show() method. Instead use scnprintf() which returns the number of bytes
> actually written.

for sysfs attributes, sysfs_emit() should be used instead.  Why not do
that here?

But what is wrong with the current code?  Is it not working properly?

thanks,

greg k-h

  reply	other threads:[~2025-07-01 10:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13 13:44 [PATCH] firmware/memmap: use scnprintf() in show funcs Pranav Tyagi
2025-07-01 10:27 ` Greg KH [this message]
2025-07-01 11:29   ` Pranav Tyagi

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=2025070154-cringe-tidings-20f5@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=chentao@kylinos.cn \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pranav.tyagi03@gmail.com \
    --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