Skip to content

Commit

Permalink
IB/core: Fix IB_SA_COMP_MASK macro
Browse files Browse the repository at this point in the history
It needs parentheses around the argument, so that it can be used with
complex arguments (e.g., "n+5").

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Jack Morgenstein authored and Roland Dreier committed May 19, 2012
1 parent c4870eb commit 02daaf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/rdma/ib_mad.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ struct ib_rmpp_hdr {

typedef u64 __bitwise ib_sa_comp_mask;

#define IB_SA_COMP_MASK(n) ((__force ib_sa_comp_mask) cpu_to_be64(1ull << n))
#define IB_SA_COMP_MASK(n) ((__force ib_sa_comp_mask) cpu_to_be64(1ull << (n)))

/*
* ib_sa_hdr and ib_sa_mad structures must be packed because they have
Expand Down

0 comments on commit 02daaf2

Please sign in to comment.