From: Max Filippov <jcmvbkbc@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Hannes Reinecke <hare@suse.de>,
linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>,
Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH] drivers/nvme: fix pr_warn format string
Date: Mon, 25 Jul 2022 12:17:51 -0700 [thread overview]
Message-ID: <20220725191751.960838-1-jcmvbkbc@gmail.com> (raw)
Use %zu format instead of %lu to print variable of size_t type.
This fixes the following gcc build error on 32-bit targets:
error: format '%lu' expects argument of type 'long unsigned int',
but argument 3 has type 'size_t' {aka 'unsigned int'}
Fixes: 71ebe3842ebe ("nvmet-auth: Diffie-Hellman key exchange support")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
drivers/nvme/target/auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/auth.c b/drivers/nvme/target/auth.c
index bf92435c783c..716a10ca91d1 100644
--- a/drivers/nvme/target/auth.c
+++ b/drivers/nvme/target/auth.c
@@ -488,7 +488,7 @@ int nvmet_auth_ctrl_exponential(struct nvmet_req *req,
return -ENOKEY;
}
if (buf_size != ctrl->dh_keysize) {
- pr_warn("ctrl %d DH public key size mismatch, need %lu is %d\n",
+ pr_warn("ctrl %d DH public key size mismatch, need %zu is %d\n",
ctrl->cntlid, ctrl->dh_keysize, buf_size);
ret = -EINVAL;
} else {
--
2.30.2
next reply other threads:[~2022-07-25 19:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 19:17 Max Filippov [this message]
2022-07-26 11:32 ` [PATCH] drivers/nvme: fix pr_warn format string Christoph Hellwig
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=20220725191751.960838-1-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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