diff mbox series

scsi: mpi3mr: Fix a format specifier

Message ID 20240529205226.3146936-1-bvanassche@acm.org
State New
Headers show
Series scsi: mpi3mr: Fix a format specifier | expand

Commit Message

Bart Van Assche May 29, 2024, 8:52 p.m. UTC
Fix the following compiler warning when building a 32-bit kernel:

./include/linux/kern_levels.h:5:25: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Werror=format=]
drivers/scsi/mpi3mr/mpi3mr_transport.c:1367:25: note: in expansion of macro ‘ioc_warn’
 1367 |                         ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
      |                         ^~~~~~~~

Cc: Tomas Henzl <thenzl@redhat.com>
Cc: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
Fixes: 3668651def2c ("scsi: mpi3mr: Sanitise num_phys")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/mpi3mr/mpi3mr_transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index 329cc6ec3b58..82aa4e418c5a 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -1364,7 +1364,7 @@  static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
 			continue;
 
 		if (i > sizeof(mr_sas_port->phy_mask) * 8) {
-			ioc_warn(mrioc, "skipping port %u, max allowed value is %lu\n",
+			ioc_warn(mrioc, "skipping port %u, max allowed value is %zu\n",
 			    i, sizeof(mr_sas_port->phy_mask) * 8);
 			goto out_fail;
 		}