All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: qla2xxx: Fix size_t format specifier in qla29xx_process_rd_image()
@ 2026-08-11 21:39 Nathan Chancellor
  2026-08-11 21:55 ` Bart Van Assche
  2026-08-14  1:42 ` Martin K. Petersen (Oracle)
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2026-08-11 21:39 UTC (permalink / raw)
  To: Nilesh Javali, GR-QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen
  Cc: Hannes Reinecke, Manish Rangankar, linux-scsi, linux-kernel,
	Nathan Chancellor

After commit c3930ec119cb ("scsi: qla2xxx: Add FC operational firmware
load for 29xx"), there is a warning due to an incorrect format specifier
for a 'size_t' variable when building for 32-bit platforms, for which
'size_t' is 'unsigned int':

  drivers/scsi/qla2xxx/qla_init.c: In function 'qla29xx_process_rd_image':
  drivers/scsi/qla2xxx/qla_init.c:9272:74: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
   9272 |                             "TIM section too large (0x%x bytes, ring 0x%lx bytes).\n",
        |                                                                        ~~^
        |                                                                          |
        |                                                                          long unsigned int
        |                                                                        %x
   9273 |                             section_size,
   9274 |                             req->length * qla_req_entry_size(ha));
        |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        |                                         |
        |                                         size_t {aka unsigned int}
  cc1: all warnings being treated as errors

Use '%zx', the proper 'size_t' format specifier, to clear up the
warning.

Fixes: c3930ec119cb ("scsi: qla2xxx: Add FC operational firmware load for 29xx")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 drivers/scsi/qla2xxx/qla_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 2b9a9c672ec6..900cd141928e 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -9269,7 +9269,7 @@ static int qla29xx_process_rd_image(struct scsi_qla_host *vha,
 	if (section == TIM) {
 		if (section_size > req->length * qla_req_entry_size(ha)) {
 			ql_log(ql_log_fatal, vha, 0x0098,
-			    "TIM section too large (0x%x bytes, ring 0x%lx bytes).\n",
+			    "TIM section too large (0x%x bytes, ring 0x%zx bytes).\n",
 			    section_size,
 			    req->length * qla_req_entry_size(ha));
 			return QLA_FUNCTION_FAILED;

---
base-commit: 376a3960e5efe85ff765abfb5b5b7e4655ad6aed
change-id: 20260811-scsi-qla2xxxx-qla_init-wformat-c542b3cfa6fa

Best regards,
--  
Cheers,
Nathan


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

* Re: [PATCH] scsi: qla2xxx: Fix size_t format specifier in qla29xx_process_rd_image()
  2026-08-11 21:39 [PATCH] scsi: qla2xxx: Fix size_t format specifier in qla29xx_process_rd_image() Nathan Chancellor
@ 2026-08-11 21:55 ` Bart Van Assche
  2026-08-14  1:42 ` Martin K. Petersen (Oracle)
  1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2026-08-11 21:55 UTC (permalink / raw)
  To: Nathan Chancellor, Nilesh Javali, GR-QLogic-Storage-Upstream,
	James E.J. Bottomley, Martin K. Petersen
  Cc: Hannes Reinecke, Manish Rangankar, linux-scsi, linux-kernel

On 8/11/26 2:39 PM, Nathan Chancellor wrote:
> Use '%zx', the proper 'size_t' format specifier, to clear up the
> warning.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

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

* Re: [PATCH] scsi: qla2xxx: Fix size_t format specifier in qla29xx_process_rd_image()
  2026-08-11 21:39 [PATCH] scsi: qla2xxx: Fix size_t format specifier in qla29xx_process_rd_image() Nathan Chancellor
  2026-08-11 21:55 ` Bart Van Assche
@ 2026-08-14  1:42 ` Martin K. Petersen (Oracle)
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen (Oracle) @ 2026-08-14  1:42 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Nilesh Javali, GR-QLogic-Storage-Upstream, James E.J. Bottomley,
	Martin K. Petersen, Hannes Reinecke, Manish Rangankar, linux-scsi,
	linux-kernel


Nathan,

> After commit c3930ec119cb ("scsi: qla2xxx: Add FC operational firmware
> load for 29xx"), there is a warning due to an incorrect format
> specifier for a 'size_t' variable when building for 32-bit platforms,
> for which 'size_t' is 'unsigned int':

Applied to 7.3/scsi-staging, thanks!

-- 
Martin K. Petersen

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

end of thread, other threads:[~2026-08-14  1:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 21:39 [PATCH] scsi: qla2xxx: Fix size_t format specifier in qla29xx_process_rd_image() Nathan Chancellor
2026-08-11 21:55 ` Bart Van Assche
2026-08-14  1:42 ` Martin K. Petersen (Oracle)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.