]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: fix build error with INFINIBAND_USER_ACCESS=n
authorArnd Bergmann <arnd@arndb.de>
Tue, 19 Oct 2021 06:15:45 +0000 (08:15 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 25 Oct 2021 17:16:05 +0000 (14:16 -0300)
commitec93ebd521c86c3c854cf17b6701bcc5c242885a
tree61915e0b5f26dbbe1cf68566d7e24bdd7be3c34f
parentd004a9b5eaf3ae25867294e078f2a9eaf34e35ed
RDMA/mlx5: fix build error with INFINIBAND_USER_ACCESS=n

The mlx5_ib_fs_add_op_fc/mlx5_ib_fs_remove_op_fc functions are only
available when user access is enabled, without that we run into a link
error:

ERROR: modpost: "mlx5_ib_fs_add_op_fc" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!
ERROR: modpost: "mlx5_ib_fs_remove_op_fc" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined!

Conditionally compiling the newly added code section makes it build,
though this is probably not a correct fix.

Fixes: 7f4eae439989 ("RDMA/mlx5: Add modify_op_stat() support")
Link: https://lore.kernel.org/r/20211019061602.3062196-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/counters.c