diff mbox series

[mlx5-next,5/6] net/mlx5: Unexport functions that need not be exported

Message ID 20180808232353.15514-6-saeedm@mellanox.com (mailing list archive)
State Not Applicable
Headers show
Series Mellanox, mlx5 next updates 2018-08-09 | expand

Commit Message

Saeed Mahameed Aug. 8, 2018, 11:23 p.m. UTC
From: Eli Cohen <eli@mellanox.com>

mlx5_query_vport_state() and mlx5_modify_vport_admin_state() are used
only from within mlx5_core  - unexport them.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Leon Romanovsky Aug. 9, 2018, 4:34 a.m. UTC | #1
On Wed, Aug 08, 2018 at 04:23:52PM -0700, Saeed Mahameed wrote:
> From: Eli Cohen <eli@mellanox.com>
>
> mlx5_query_vport_state() and mlx5_modify_vport_admin_state() are used
> only from within mlx5_core  - unexport them.
>
> Signed-off-by: Eli Cohen <eli@mellanox.com>
> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
> index 7ec85747c450..702e235962aa 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
> @@ -62,7 +62,6 @@ u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport)
>
>  	return MLX5_GET(query_vport_state_out, out, state);
>  }
> -EXPORT_SYMBOL_GPL(mlx5_query_vport_state);
>

Hi Saeed,

I see that Dave is already applied it, so my comment is mostly for
future submission. This patch went to a right direction by reducing
export symbol pollution, but left function declarations in globally
visible include/linux/mlx5/vport.h header file.

Such situation leaves the mlx5 driver in limbo state
where mlx5_ib have access to those functions but can't use them.

Care to send followup patch to fix it?

>  int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
>  				  u16 vport, u8 state)
> @@ -80,7 +79,6 @@ int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
>
>  	return mlx5_cmd_exec(mdev, in, sizeof(in), out, sizeof(out));
>  }
> -EXPORT_SYMBOL_GPL(mlx5_modify_vport_admin_state);
>
>  static int mlx5_query_nic_vport_context(struct mlx5_core_dev *mdev, u16 vport,
>  					u32 *out, int outlen)
> --
> 2.17.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
index 7ec85747c450..702e235962aa 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
@@ -62,7 +62,6 @@  u8 mlx5_query_vport_state(struct mlx5_core_dev *mdev, u8 opmod, u16 vport)
 
 	return MLX5_GET(query_vport_state_out, out, state);
 }
-EXPORT_SYMBOL_GPL(mlx5_query_vport_state);
 
 int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
 				  u16 vport, u8 state)
@@ -80,7 +79,6 @@  int mlx5_modify_vport_admin_state(struct mlx5_core_dev *mdev, u8 opmod,
 
 	return mlx5_cmd_exec(mdev, in, sizeof(in), out, sizeof(out));
 }
-EXPORT_SYMBOL_GPL(mlx5_modify_vport_admin_state);
 
 static int mlx5_query_nic_vport_context(struct mlx5_core_dev *mdev, u16 vport,
 					u32 *out, int outlen)