scsi: qla2xxx: Fix size_t format specifier in qla29xx_process_rd_image()

After commit c3930ec119 ("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: c3930ec119 ("scsi: qla2xxx: Add FC operational firmware load for 29xx")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260811-scsi-qla2xxxx-qla_init-wformat-v1-1-50760021914f@kernel.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
Nathan Chancellor 2026-08-11 14:39:51 -07:00 committed by Martin K. Petersen (Oracle)
parent 376a3960e5
commit 431e735e9b

View File

@ -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;