[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220725191751.960838-1-jcmvbkbc@gmail.com>
Date: Mon, 25 Jul 2022 12:17:51 -0700
From: Max Filippov <jcmvbkbc@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Hannes Reinecke <hare@...e.de>, linux-nvme@...ts.infradead.org,
Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>,
Max Filippov <jcmvbkbc@...il.com>
Subject: [PATCH] drivers/nvme: fix pr_warn format string
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@...il.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
Powered by blists - more mailing lists