> From: Kamal Heib <kamalheib1@xxxxxxxxx> > Sent: Friday, August 2, 2019 12:32 PM > > External Email > > ---------------------------------------------------------------------- > In order to improve readability, add ib_port_phys_state enum to replace the > use of magic numbers. > > Signed-off-by: Kamal Heib <kamalheib1@xxxxxxxxx> > Reviewed-by: Andrew Boyer <aboyer@xxxxxxxxxx> > --- > drivers/infiniband/core/sysfs.c | 24 +++++++++++++------- > drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 ++-- > drivers/infiniband/hw/efa/efa_verbs.c | 2 +- > drivers/infiniband/hw/hns/hns_roce_device.h | 10 -------- > drivers/infiniband/hw/hns/hns_roce_main.c | 3 ++- > drivers/infiniband/hw/mlx4/main.c | 3 ++- > drivers/infiniband/hw/mlx5/main.c | 4 ++-- > drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 4 ++-- > drivers/infiniband/hw/qedr/verbs.c | 4 ++-- > drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 7 +++--- > drivers/infiniband/sw/rxe/rxe.h | 4 ---- > drivers/infiniband/sw/rxe/rxe_param.h | 2 +- > drivers/infiniband/sw/rxe/rxe_verbs.c | 6 ++--- > drivers/infiniband/sw/siw/siw_verbs.c | 3 ++- > include/rdma/ib_verbs.h | 10 ++++++++ > 15 files changed, 49 insertions(+), 41 deletions(-) > > a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c > index 0c6a4bc848f5..6f3ce86019b7 100644 > --- a/drivers/infiniband/hw/qedr/verbs.c > +++ b/drivers/infiniband/hw/qedr/verbs.c > @@ -221,10 +221,10 @@ int qedr_query_port(struct ib_device *ibdev, u8 > port, struct ib_port_attr *attr) > /* *attr being zeroed by the caller, avoid zeroing it here */ > if (rdma_port->port_state == QED_RDMA_PORT_UP) { > attr->state = IB_PORT_ACTIVE; > - attr->phys_state = 5; > + attr->phys_state = IB_PORT_PHYS_STATE_LINK_UP; > } else { > attr->state = IB_PORT_DOWN; > - attr->phys_state = 3; > + attr->phys_state = IB_PORT_PHYS_STATE_DISABLED; > } > attr->max_mtu = IB_MTU_4096; > attr->active_mtu = iboe_get_mtu(dev->ndev->mtu); diff --git Thanks, For qedr changes Acked-by: Michal Kalderon <michal.kalderon@xxxxxxxxxxx>