scsi: fix qla2xxx printk format warnings
Subsystems (2)
PATCH 1/1 scsi: fix qla2xxx printk format warnings
From: Randy Dunlap <[email protected]>
Fix printk format warnings (from i386 build) by using %zu format specifier. No warnings on i386 or x86_64.
drivers/scsi/qla2xxx/qla_target.c:2951:5: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'size_t' drivers/scsi/qla2xxx/tcm_qla2xxx.c:1564:3: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' drivers/scsi/qla2xxx/tcm_qla2xxx.c:1570:2: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' drivers/scsi/qla2xxx/tcm_qla2xxx.c:1576:3: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' drivers/scsi/qla2xxx/tcm_qla2xxx.c:1584:2: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int'
--- drivers/scsi/qla2xxx/qla_target.c | 2 +- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_target.c +1 -1
@@ -2948,7 +2948,7 @@ static int qla_tgt_set_data_offset(struc sg_srr_start = sg;ql_dbg (ql_dbg_tgt_sgl, cmd->vha,0xe307 ,"Found matching sg[%d]," " using %p as sg_srr_start, and using first_offset:" -" %lu\n" , i, sg, first_offset); +" %zu\n" , i, sg, first_offset);break ; } tmp += sg->length;
drivers/scsi/qla2xxx/tcm_qla2xxx.c +4 -4
@@ -1561,27 +1561,27 @@ static int tcm_qla2xxx_init_lport(struct lport->lport_fcport_map =vmalloc (sizeof (struct tcm_qla2xxx_fc_domain ) *256 );if (!lport->lport_fcport_map) { -pr_err ("Unable to allocate lport_fcport_map of %lu" +pr_err ("Unable to allocate lport_fcport_map of %zu" " bytes\n" ,sizeof (struct tcm_qla2xxx_fc_domain ) *256 );return -ENOMEM ; }memset (lport->lport_fcport_map,0 ,sizeof (struct tcm_qla2xxx_fc_domain ) *256 ); -pr_debug ("qla2xxx: Allocated lport_fcport_map of %lu bytes\n" , +pr_debug ("qla2xxx: Allocated lport_fcport_map of %zu bytes\n" ,sizeof (struct tcm_qla2xxx_fc_domain ) *256 ); lport->lport_loopid_map =vmalloc (sizeof (struct tcm_qla2xxx_fc_loopid ) *65536 );if (!lport->lport_loopid_map) {pr_err ("Unable to allocate lport->lport_loopid_map" -" of %lu bytes\n" ,sizeof (struct tcm_qla2xxx_fc_loopid ) +" of %zu bytes\n" ,sizeof (struct tcm_qla2xxx_fc_loopid ) *65536 );vfree (lport->lport_fcport_map);return -ENOMEM ; }memset (lport->lport_loopid_map,0 ,sizeof (struct tcm_qla2xxx_fc_loopid ) *65536 ); -pr_debug ("qla2xxx: Allocated lport_loopid_map of %lu bytes\n" , +pr_debug ("qla2xxx: Allocated lport_loopid_map of %zu bytes\n" ,sizeof (struct tcm_qla2xxx_fc_loopid ) *65536 );return 0 ; }