PATCH: undefined shifts in qla1280

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Fri Jul 18 2003 - 09:19:18 EST


C doesn't define >> by 32 for 32bit systems, and on some gcc leaves
you with the original value...

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.6.0-test1/drivers/scsi/qla1280.c linux-2.6.0-test1-ac2/drivers/scsi/qla1280.c
--- linux-2.6.0-test1/drivers/scsi/qla1280.c 2003-07-10 21:15:36.000000000 +0100
+++ linux-2.6.0-test1-ac2/drivers/scsi/qla1280.c 2003-07-14 14:55:46.000000000 +0100
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:34 EST