[SCSI] aacraid: Fix warning about macro side-effects
authorMark Salyzyn <Mark_Salyzyn@adaptec.com>
Wed, 30 Apr 2008 19:28:32 +0000 (15:28 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 2 May 2008 18:05:28 +0000 (13:05 -0500)
On some compile environments, warnings are produced regarding the
usage of aac_logical_to_phys macro.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/aacraid/aacraid.h

index 113ca9c..a990e5b 100644 (file)
@@ -34,8 +34,8 @@
 #define CONTAINER_TO_ID(cont)          (cont)
 #define CONTAINER_TO_LUN(cont)         (0)
 
-#define aac_phys_to_logical(x)  (x+1)
-#define aac_logical_to_phys(x)  (x?x-1:0)
+#define aac_phys_to_logical(x)  ((x)+1)
+#define aac_logical_to_phys(x)  ((x)?(x)-1:0)
 
 /* #define AAC_DETAILED_STATUS_INFO */