From: Arjan van de Ven In C, doing >> 32 on a 32 bit wide variable is undefined behavior, and the code that gets generated by gcc (using the cpu shr) effectively means that it's a nop. The patch below to qla1280.c fixes such a case, doing >>16 twice looks more expensive but gcc optimizes it out while keeping correct behavior. drivers/scsi/qla1280.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/scsi/qla1280.c~qlogic-shift-fix drivers/scsi/qla1280.c --- 25/drivers/scsi/qla1280.c~qlogic-shift-fix 2003-07-14 02:29:41.000000000 -0700 +++ 25-akpm/drivers/scsi/qla1280.c 2003-07-14 02:29:41.000000000 -0700 @@ -327,7 +327,7 @@ /* 3.16 */ #ifdef QLA_64BIT_PTR #define pci_dma_lo32(a) (a & 0xffffffff) -#define pci_dma_hi32(a) (a >> 32) +#define pci_dma_hi32(a) ((a >> 16)>>16) #else #define pci_dma_lo32(a) (a & 0xffffffff) #define pci_dma_hi32(a) 0 _