From: Bart Van Assche <bvanassche@acm.org>
To: 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 20:55:05 -0800 [thread overview]
Message-ID: <9d745731-f8a3-98bf-3ca8-6367ef53aa8d@acm.org> (raw)
In-Reply-To: <1611201437-111938-1-git-send-email-abaci-bugfix@linux.alibaba.com>
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().
Bart.
next prev parent reply other threads:[~2021-01-21 4:57 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 [this message]
2021-01-21 5:15 ` Joe Perches
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=9d745731-f8a3-98bf-3ca8-6367ef53aa8d@acm.org \
--to=bvanassche@acm.org \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=abaci-bugfix@linux.alibaba.com \
--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®