]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_re: Fix incorrect usage of test_bit()
authorSomnath Kotur <somnath.kotur@broadcom.com>
Fri, 13 Oct 2017 06:08:00 +0000 (11:38 +0530)
committerDoug Ledford <dledford@redhat.com>
Wed, 18 Oct 2017 14:24:12 +0000 (10:24 -0400)
commitba2f0d6ef0d016a374ce15af8b62ead6911b1a02
treea30c4e0df9e0420c6dcfcb805c790cad10698b1a
parent9dd093cc8984157919594d819546722676a1e52c
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>
drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.h