diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-08-25 17:00:45 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 13:07:40 -0400 |
commit | 922aa210bcad4b34a7bb98ec9d318b7e59e7a5ca (patch) | |
tree | 480d1304252f34cdb8286ec104850648b852e598 /include/scsi | |
parent | 795d86f55ec3bf6280dda368f208943f1fb7d366 (diff) |
[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 <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libfc.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
223 | }; | 223 | }; |
224 | 224 | ||
225 | #define PRIV_TO_RPORT(x) \ | 225 | #define PRIV_TO_RPORT(x) \ |
226 | (struct fc_rport *)((void *)x - sizeof(struct fc_rport)); | 226 | ((struct fc_rport *)((void *)(x) - sizeof(struct fc_rport))) |
227 | #define RPORT_TO_PRIV(x) \ | 227 | #define RPORT_TO_PRIV(x) \ |
228 | (struct fc_rport_libfc_priv *)((void *)x + sizeof(struct fc_rport)); | 228 | ((struct fc_rport_libfc_priv *)((void *)(x) + sizeof(struct fc_rport))) |
229 | 229 | ||
230 | static inline void fc_rport_set_name(struct fc_rport *rport, u64 wwpn, u64 wwnn) | 230 | static inline void fc_rport_set_name(struct fc_rport *rport, u64 wwpn, u64 wwnn) |
231 | { | 231 | { |