iw_cxgb4: Use proper enumerated type in c4iw_bar2_addrs
authorNathan Chancellor <natechancellor@gmail.com>
Mon, 24 Sep 2018 19:29:03 +0000 (12:29 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 25 Sep 2018 20:37:17 +0000 (14:37 -0600)
commit1b571086e869395b6a11ab24186b0104fe05c057
tree060c6dbe067828cf3e70789231e5c2926d8e1e1f
parent0430e74f9fbe4d027a86f39fdb6f20427912088f
iw_cxgb4: Use proper enumerated type in c4iw_bar2_addrs

Clang warns when one enumerated type is implicitly converted to another.

drivers/infiniband/hw/cxgb4/qp.c:287:8: warning: implicit conversion
from enumeration type 'enum t4_bar2_qtype' to different enumeration type
'enum cxgb4_bar2_qtype' [-Wenum-conversion]
                                                 T4_BAR2_QTYPE_EGRESS,
                                                 ^~~~~~~~~~~~~~~~~~~~

c4iw_bar2_addrs expects a value from enum cxgb4_bar2_qtype so use the
corresponding values from that type so Clang is satisfied without changing
the meaning of the code.

T4_BAR2_QTYPE_EGRESS = CXGB4_BAR2_QTYPE_EGRESS = 0
T4_BAR2_QTYPE_INGRESS = CXGB4_BAR2_QTYPE_INGRESS = 1

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/cxgb4/cq.c
drivers/infiniband/hw/cxgb4/qp.c