Skip to content

Commit 9967c70

Browse files
arndbdledford
authored andcommitted
IB/mlx5: fix VFs callback function prototypes
The previous patch that added a couple of callback functions put the declarations inside of an #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING, which causes the build to fail if that option is disabled: drivers/infiniband/hw/mlx5/main.c: In function 'mlx5_ib_add': drivers/infiniband/hw/mlx5/main.c:2358:31: error: 'mlx5_ib_get_vf_config' undeclared (first use in this function) This moves the four declarations below the #ifdef section so they are always available. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: eff901d ("IB/mlx5: Implement callbacks for manipulating VFs") Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 9735a22 commit 9967c70

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/infiniband/hw/mlx5/mlx5_ib.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -776,15 +776,6 @@ void mlx5_ib_qp_disable_pagefaults(struct mlx5_ib_qp *qp);
776776
void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp);
777777
void mlx5_ib_invalidate_range(struct ib_umem *umem, unsigned long start,
778778
unsigned long end);
779-
int mlx5_ib_get_vf_config(struct ib_device *device, int vf,
780-
u8 port, struct ifla_vf_info *info);
781-
int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
782-
u8 port, int state);
783-
int mlx5_ib_get_vf_stats(struct ib_device *device, int vf,
784-
u8 port, struct ifla_vf_stats *stats);
785-
int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port,
786-
u64 guid, int type);
787-
788779
#else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
789780
static inline void mlx5_ib_internal_fill_odp_caps(struct mlx5_ib_dev *dev)
790781
{
@@ -801,6 +792,15 @@ static inline void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp) {}
801792

802793
#endif /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
803794

795+
int mlx5_ib_get_vf_config(struct ib_device *device, int vf,
796+
u8 port, struct ifla_vf_info *info);
797+
int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf,
798+
u8 port, int state);
799+
int mlx5_ib_get_vf_stats(struct ib_device *device, int vf,
800+
u8 port, struct ifla_vf_stats *stats);
801+
int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port,
802+
u64 guid, int type);
803+
804804
__be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num,
805805
int index);
806806

0 commit comments

Comments
 (0)