diff options
-rw-r--r-- | drivers/infiniband/core/netlink.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c index b66b6d06144b..b12e58787c3d 100644 --- a/drivers/infiniband/core/netlink.c +++ b/drivers/infiniband/core/netlink.c @@ -58,12 +58,11 @@ EXPORT_SYMBOL(rdma_nl_chk_listeners); static bool is_nl_msg_valid(unsigned int type, unsigned int op) { static const unsigned int max_num_ops[RDMA_NL_NUM_CLIENTS] = { - 0, - RDMA_NL_RDMA_CM_NUM_OPS, - RDMA_NL_IWPM_NUM_OPS, - 0, - RDMA_NL_LS_NUM_OPS, - RDMA_NLDEV_NUM_OPS }; + [RDMA_NL_RDMA_CM] = RDMA_NL_RDMA_CM_NUM_OPS, + [RDMA_NL_IWCM] = RDMA_NL_IWPM_NUM_OPS, + [RDMA_NL_LS] = RDMA_NL_LS_NUM_OPS, + [RDMA_NL_NLDEV] = RDMA_NLDEV_NUM_OPS, + }; /* * This BUILD_BUG_ON is intended to catch addition of new |