RDMA/core: Don't compare specific bit after boolean AND
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 10 Mar 2019 15:27:46 +0000 (17:27 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 29 Mar 2019 18:06:38 +0000 (15:06 -0300)
There is no need to perform extra comparison after boolean AND.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
include/rdma/ib_verbs.h

index 418d17c..3b6eb64 100644 (file)
@@ -2994,8 +2994,8 @@ static inline bool rdma_cap_ib_mad(const struct ib_device *device, u8 port_num)
  */
 static inline bool rdma_cap_opa_mad(struct ib_device *device, u8 port_num)
 {
-       return (device->port_data[port_num].immutable.core_cap_flags &
-               RDMA_CORE_CAP_OPA_MAD) == RDMA_CORE_CAP_OPA_MAD;
+       return device->port_data[port_num].immutable.core_cap_flags &
+               RDMA_CORE_CAP_OPA_MAD;
 }
 
 /**