From: Joe Eykholt Date: Tue, 25 Aug 2009 21:00:45 +0000 (-0700) Subject: [SCSI] libfc: fix RPORT_TO_PRIV and PRIV_TO_RPORT() macros. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=922aa210bcad4b34a7bb98ec9d318b7e59e7a5ca;p=linux-beck.git [SCSI] libfc: fix RPORT_TO_PRIV and PRIV_TO_RPORT() macros. These macros introduce extra undesirable semicolons that keep them from being used in expressions, and they don't protect against being passed an expression. Add parens and remove the semicolons. Signed-off-by: Joe Eykholt Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index d888cbecd72e..2fdd8ac12b89 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h @@ -223,9 +223,9 @@ struct fc_rport_libfc_priv { }; #define PRIV_TO_RPORT(x) \ - (struct fc_rport *)((void *)x - sizeof(struct fc_rport)); + ((struct fc_rport *)((void *)(x) - sizeof(struct fc_rport))) #define RPORT_TO_PRIV(x) \ - (struct fc_rport_libfc_priv *)((void *)x + sizeof(struct fc_rport)); + ((struct fc_rport_libfc_priv *)((void *)(x) + sizeof(struct fc_rport))) static inline void fc_rport_set_name(struct fc_rport *rport, u64 wwpn, u64 wwnn) {