On Wed, May 04, 2016 at 08:36:04AM +0300, Leon Romanovsky wrote: > -static const struct ibnl_client_cbs cma_cb_table[] = { > +static const struct ibnl_client_cbs cma_cb_table[RDMA_NL_RDMA_CM_NUM_OPS] = { > [RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats, > .module = THIS_MODULE }, Isn't it much better to change this: if (ibnl_add_client(RDMA_NL_RDMA_CM, RDMA_NL_RDMA_CM_NUM_OPS, cma_cb_table)) to if (ibnl_add_client(RDMA_NL_RDMA_CM, NELEMS(cma_cb_table), cma_cb_table)) And eliminate RDMA_NL_RDMA_CM_NUM_OPS entirely? Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html