All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jules Irenge <jbi.octave@gmail.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/7] scsi: Convert snprintf() to scnprintf()
Date: Wed, 28 Sep 2022 14:37:29 +0100	[thread overview]
Message-ID: <YzROGS934MbKlwxQ@octinomon> (raw)
In-Reply-To: <ea00dcab-e4f6-f672-e754-9ddec67da83d@acm.org>

On Mon, Sep 26, 2022 at 12:14:05PM -0700, Bart Van Assche wrote:
> On 9/26/22 11:40, Jules Irenge wrote:
> > Coccinnelle reports a warning
> > Warning: Use scnprintf or sprintf
> > Adding to that, there has been a slow migration from snprintf to scnprintf.
> > This LWN article explains the rationale for this change
> > https: //lwn.net/Articles/69419/
> > Ie. snprintf() returns what *would* be the resulting length,
> > while scnprintf() returns the actual length.
> 
> Isn't using snprintf() or scnprintf() inside sysfs show callbacks considered
> deprecated?
> 
You are right.

sysfs_emit() is preferred here.
If I have the blessing of the maintainer, I will go ahead and send a
second version with those changes.

Thanks,
Jules

  reply	other threads:[~2022-09-28 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26 18:40 [PATCH 2/7] scsi: Convert snprintf() to scnprintf() Jules Irenge
2022-09-26 19:14 ` Bart Van Assche
2022-09-28 13:37   ` Jules Irenge [this message]
2022-10-01  9:44     ` Martin K. Petersen

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=YzROGS934MbKlwxQ@octinomon \
    --to=jbi.octave@gmail.com \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.