mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'hanyu001@208suo.com'" <hanyu001@208suo.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: RE: [PATCH] scsi: snic: Convert snprintf to scnprintf
Date: Fri, 14 Jul 2023 14:56:17 +0000	[thread overview]
Message-ID: <7cd26b15c9214e7c9b5c76ad67cebb9e@AcuMS.aculab.com> (raw)
In-Reply-To: <fe09ebd8774d05dc4038e640d7ddb2e4@208suo.com>

From: hanyu001@208suo.com
> Sent: 12 July 2023 11:16
> 
> Coccinelle reports a warning:
> 
> drivers/scsi/snic/snic_attrs.c:35: WARNING: use scnprintf or sprintf
> drivers/scsi/snic/snic_attrs.c:48: WARNING: use scnprintf or sprintf
> drivers/scsi/snic/snic_attrs.c:26: WARNING: use scnprintf or sprintf:

The function you are looking for is (probably) sysfs_emit().

The PAGE_SIZE constant ought to be a good hint that neither
sprintf, snprintf or scnprintf is actually right.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2023-07-14 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_D20A645667548A8D5B1261D32ED4369FD70A@qq.com>
2023-07-12 10:16 ` Fwd: " hanyu001
2023-07-14 14:56   ` David Laight [this message]
2023-07-12 10:27 ` hanyu001

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=7cd26b15c9214e7c9b5c76ad67cebb9e@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=hanyu001@208suo.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®