Explorar o código

[SCSI] aacraid: Fix warning about macro side-effects

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>
Mark Salyzyn %!s(int64=17) %!d(string=hai) anos
pai
achega
e2efe7aa24
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      drivers/scsi/aacraid/aacraid.h

+ 2 - 2
drivers/scsi/aacraid/aacraid.h

@@ -34,8 +34,8 @@
 #define CONTAINER_TO_ID(cont)		(cont)
 #define CONTAINER_TO_ID(cont)		(cont)
 #define CONTAINER_TO_LUN(cont)		(0)
 #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 */
 /* #define AAC_DETAILED_STATUS_INFO */