• Qian Cai's avatar
    RDMA/core: Fix -Wunused-const-variable warnings · bedc0fd0
    Qian Cai authored
    The commit below introduced a few compilation warnings.
    
    In file included from ./include/rdma/ib_verbs.h:64,
                     from ./include/linux/mlx5/device.h:37,
                     from ./include/linux/mlx5/driver.h:51,
                     from drivers/net/ethernet/mellanox/mlx5/core/uar.c:36:
    ./include/linux/dim.h:378:1: warning: 'rdma_dim_prof' defined but not
    used [-Wunused-const-variable=]
     rdma_dim_prof[RDMA_DIM_PARAMS_NUM_PROFILES] = {
     ^~~~~~~~~~~~~
    In file included from ./include/rdma/ib_verbs.h:64,
                     from ./include/linux/mlx5/device.h:37,
                     from ./include/linux/mlx5/driver.h:51,
                     from
    drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:37:
    ./include/linux/dim.h:378:1: warning: 'rdma_dim_prof' defined but not
    used [-Wunused-const-variable=]
     rdma_dim_prof[RDMA_DIM_PARAMS_NUM_PROFILES] = {
     ^~~~~~~~~~~~~
    
    Since only ib_cq_rdma_dim_work() in drivers/infiniband/core/cq.c uses it,
    just move the definition over there.
    
    Fixes: f4915455 ("linux/dim: Implement RDMA adaptive moderation (DIM)")
    Signed-off-by: default avatarQian Cai <cai@lca.pw>
    Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    bedc0fd0
cq.c 6.91 KB