diff options
author | Roland Dreier <roland@purestorage.com> | 2014-06-03 13:24:24 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-06-03 13:24:24 -0400 |
commit | 5343c00dd0f2543d5751575515bdae4b801820ea (patch) | |
tree | 7d60a23aed12786b1fdbd8b2a027b56c04b0201c | |
parent | 729ee4efcc29c040a1729c058f03fae3cebc6035 (diff) |
IB/mad: Fix sparse warning about gfp_t use
Properly convert gfp_t & result to bool to fix:
drivers/infiniband/core/sa_query.c:621:33: warning: incorrect type in initializer (different base types)
drivers/infiniband/core/sa_query.c:621:33: expected bool [unsigned] [usertype] preload
drivers/infiniband/core/sa_query.c:621:33: got restricted gfp_t
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | drivers/infiniband/core/sa_query.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index f820958e4047..233eaf541f55 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c | |||
@@ -618,7 +618,7 @@ static void init_mad(struct ib_sa_mad *mad, struct ib_mad_agent *agent) | |||
618 | 618 | ||
619 | static int send_mad(struct ib_sa_query *query, int timeout_ms, gfp_t gfp_mask) | 619 | static int send_mad(struct ib_sa_query *query, int timeout_ms, gfp_t gfp_mask) |
620 | { | 620 | { |
621 | bool preload = gfp_mask & __GFP_WAIT; | 621 | bool preload = !!(gfp_mask & __GFP_WAIT); |
622 | unsigned long flags; | 622 | unsigned long flags; |
623 | int ret, id; | 623 | int ret, id; |
624 | 624 | ||