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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On some compile environments, warnings are produced regarding the usage of aac_logical_to_phys macro.

This attached patch is against current scsi-misc-2.6.

ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling of patch attachments (inline gets damaged, please use attachment).

Signed-off-by: Mark Salyzyn <aacraid@xxxxxxxxxxx>

 drivers/scsi/aacraid/aacraid.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -ru a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/ aacraid.h
--- a/drivers/scsi/aacraid/aacraid.h	2008-04-30 15:17:53.770782679 -0400
+++ b/drivers/scsi/aacraid/aacraid.h	2008-04-30 15:22:14.338590856 -0400
@@ -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 */


Sincerely - Mark Salyzyn

Attachment: aacraid_side_effects.patch
Description: Binary data



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux