public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drivers/nvme: fix pr_warn format string
@ 2022-07-25 19:17 Max Filippov
  2022-07-26 11:32 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2022-07-25 19:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hannes Reinecke, linux-nvme, Christoph Hellwig, Sagi Grimberg,
	Max Filippov

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drivers/nvme: fix pr_warn format string
  2022-07-25 19:17 [PATCH] drivers/nvme: fix pr_warn format string Max Filippov
@ 2022-07-26 11:32 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2022-07-26 11:32 UTC (permalink / raw)
  To: Max Filippov
  Cc: linux-kernel, Hannes Reinecke, linux-nvme, Christoph Hellwig,
	Sagi Grimberg

This was already fixed by:

commit d6f7cd209b089553ce0217eb0091f5f5fdc654ba
Author: Christoph Hellwig <hch@lst.de>
Date:   Mon Jul 18 07:02:29 2022 +0200

    nvmet: fix a format specifier in nvmet_auth_ctrl_exponential



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-26 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-25 19:17 [PATCH] drivers/nvme: fix pr_warn format string Max Filippov
2022-07-26 11:32 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox