scsi: fix qla2xxx printk format warning
Subsystems (2)
PATCH 1/1 scsi: fix qla2xxx printk format warning
From: Randy Dunlap <[email protected]>
sector_t can be different types, so cast it to its largest possible type.
drivers/scsi/qla2xxx/qla_isr.c:1509:5: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'sector_t'
--- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_isr.c +2 -2
@@ -1507,8 +1507,8 @@ qla2x00_handle_dif_error(srb_t *sp, struif (k != blocks_done) {qla_printk (KERN_WARNING , sp->fcport->vha->hw, -"unexpected tag values tag:lba=%x:%lx)\n" , - e_ref_tag, lba_s); +"unexpected tag values tag:lba=%x:%llx)\n" , + e_ref_tag, (unsigned long long )lba_s);return 1 ; }
Quoted 15 lines · On Fri, 23 Sep 2011 15:40:50 -0700 Randy Dunlap <[email protected]> wrote:
From: Randy Dunlap <[email protected]>
sector_tcan be different types, so cast it to its largest possible type.
drivers/scsi/qla2xxx/qla_isr.c:1509:5: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'sector_t'Signed-off-by Randy Dunlap <[email protected]>--- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_isr.c qla2x00_handle_dif_error(srb_t *sp, stru · line 1511
Quoted 7 lines
drivers/scsi/qla2xxx/qla_isr.c +2
-2@@ -1507,8 +1507,8 @@ qla2x00_handle_dif_error(srb_t *sp, struif (k != blocks_done) {qla_printk (KERN_WARNING , sp->fcport->vha->hw, -"unexpected tag values tag:lba=%x:%lx)\n" , - e_ref_tag, lba_s); +"unexpected tag values tag:lba=%x:%llx)\n" , + e_ref_tag, (unsigned long long )lba_s);
The patch does more than fix a warning - that's a runtime bug.
Giridhar Malavali
Acked-byQuoted 35 lines
Quoted 1 line
Quoted 16 lines · On Fri, 23 Sep 2011 15:40:50 -0700 Randy Dunlap <[email protected]> wrote:
From: Randy Dunlap <[email protected]>
sector_tcan be different types, so cast it to its largest possible type.
drivers/scsi/qla2xxx/qla_isr.c:1509:5: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'sector_t'Signed-off-by Randy Dunlap <[email protected]>--- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/qla2xxx/qla_isr.c qla2x00_handle_dif_error(srb_t *sp, stru · line 1511
Quoted 7 lines
drivers/scsi/qla2xxx/qla_isr.c +2
-2@@ -1507,8 +1507,8 @@ qla2x00_handle_dif_error(srb_t *sp, struif (k != blocks_done) {qla_printk (KERN_WARNING , sp->fcport->vha->hw, -"unexpected tag values tag:lba=%x:%lx)\n" , - e_ref_tag, lba_s); +"unexpected tag values tag:lba=%x:%llx)\n" , + e_ref_tag, (unsigned long long )lba_s);The patch does more than fix a warning - that's a runtime bug. --
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 29 lines
Quoted 1 line
From: Randy Dunlap <[email protected]>
sector_tcan be different types, so cast it to its largest possible type.
drivers/scsi/qla2xxx/qla_isr.c:1509:5: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'sector_t'Signed-off-by Randy Dunlap <[email protected]>---
drivers/scsi/qla2xxx/qla_isr.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/qla2xxx/qla_isr.c +2
-2@@ -1507,8 +1507,8 @@ qla2x00_handle_dif_error(srb_t *sp, struif (k != blocks_done) {qla_printk (KERN_WARNING , sp->fcport->vha->hw, -"unexpected tag values tag:lba=%x:%lx)\n" , - e_ref_tag, lba_s); +"unexpected tag values tag:lba=%x:%llx)\n" , + e_ref_tag, (unsigned long long )lba_s);return 1 ; }