From: Joe Perches <joe@perches.com>
To: Bart Van Assche <bvanassche@acm.org>,
Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>,
njavali@marvell.com
Cc: mrangankar@marvell.com, GR-QLogic-Storage-Upstream@marvell.com,
jejb@linux.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] scsi/qla4xxx: convert sysfs sprintf/snprintf family to sysfs_emit/sysfs_emit_at
Date: Wed, 20 Jan 2021 21:15:43 -0800 [thread overview]
Message-ID: <6af62f13816f24cd525865c91892d53483748d0e.camel@perches.com> (raw)
In-Reply-To: <9d745731-f8a3-98bf-3ca8-6367ef53aa8d@acm.org>
On Wed, 2021-01-20 at 20:55 -0800, Bart Van Assche wrote:
> On 1/20/21 7:57 PM, Jiapeng Zhong wrote:
> > - return snprintf(buf, PAGE_SIZE, "%d.%02d.%02d (%x)\n",
> > + return sysfs_emit_at(buf, PAGE_SIZE, "%d.%02d.%02d (%x)\n",
> > ha->fw_info.fw_major, ha->fw_info.fw_minor,
> > ha->fw_info.fw_patch, ha->fw_info.fw_build);
>
> From the sysfs_emit_at() source code:
>
> WARN(... || at >= PAGE_SIZE, "invalid sysfs_emit_at: buf:%p at:%d\n",
> buf, at)
>
> In other words, this patch is wrong. sysfs_emit() should have been used
> instead of sysfs_emit_at().
Instead, use the cocci script from
commit aa838896d87a ("drivers core: Use sysfs_emit and sysfs_emit_at for
show(device *...) functions")
prev parent reply other threads:[~2021-01-21 5:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 3:57 Jiapeng Zhong
2021-01-21 4:55 ` Bart Van Assche
2021-01-21 5:15 ` Joe Perches [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=6af62f13816f24cd525865c91892d53483748d0e.camel@perches.com \
--to=joe@perches.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=abaci-bugfix@linux.alibaba.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mrangankar@marvell.com \
--cc=njavali@marvell.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®