Commit 922aa210 authored by Joe Eykholt's avatar Joe Eykholt Committed by James Bottomley
Browse files

[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: default avatarJoe Eykholt <jeykholt@cisco.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 795d86f5
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment