aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
diff options
context:
space:
mode:
authorSomnath Kotur <somnath.kotur@broadcom.com>2017-10-13 11:38:00 +0530
committerDoug Ledford <dledford@redhat.com>2017-10-18 10:24:12 -0400
commita0ddc2ec8f2912a738165b0ce47b9d945a9e3709 (patch)
treea30c4e0df9e0420c6dcfcb805c790cad10698b1a /drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
parent6a28d5a92cdda1e290f333c95fc020d1b93a729c (diff)
bnxt_re: Fix incorrect usage of test_bit()
test_bit() takes a bit number while the 'flags' field in struct bnxt_qplib_rcfw was using actual BIT position converted values. Fix this by assigning bit numbers and use consistent APIs all the flag values. Also logging a message in case of failure. Thanks to Dan Carpenter for pointing this out. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/qplib_rcfw.h')
-rw-r--r--drivers/infiniband/hw/bnxt_re/qplib_rcfw.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
index 85b16da287f9..2946a7cfae82 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.h
@@ -162,9 +162,9 @@ struct bnxt_qplib_rcfw {
unsigned long *cmdq_bitmap;
u32 bmap_size;
unsigned long flags;
-#define FIRMWARE_INITIALIZED_FLAG BIT(0)
-#define FIRMWARE_FIRST_FLAG BIT(31)
-#define FIRMWARE_TIMED_OUT BIT(3)
+#define FIRMWARE_INITIALIZED_FLAG 0
+#define FIRMWARE_FIRST_FLAG 31
+#define FIRMWARE_TIMED_OUT 3
wait_queue_head_t waitq;
int (*aeq_handler)(struct bnxt_qplib_rcfw *,
struct creq_func_event *);