On Wed, Dec 19, 2018 at 01:22:56PM +0200, Leon Romanovsky wrote: > I continued to test it and found that compilation without CONFIG_INFINIBAND_ON_DEMAND_PAGING > created bunch of warnings about unused function. > > This diff, which is far from my original intent fixes it. > > diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h > index f245b5d8a3bc..4307d2ebf467 100644 > +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h > @@ -1207,14 +1207,6 @@ static inline void mlx5_odp_init_mr_cache_entry(struct mlx5_cache_ent *ent) {} > static inline void mlx5_odp_populate_klm(struct mlx5_klm *pklm, size_t offset, > size_t nentries, struct mlx5_ib_mr *mr, > int flags) {} > - > -static int mlx5_ib_advise_mr_prefetch(struct ib_pd *pd, Adding 'static inline' here fixes all the warnings, I've done that instead. Jason