net/mlx5: limit the function in local scope
authorZhu Yanjun <zyjzyj2000@gmail.com>
Sat, 14 Dec 2019 08:51:17 +0000 (10:51 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 7 Jan 2020 18:40:22 +0000 (10:40 -0800)
The function mlx5_buf_alloc_node is only used by the function in the
local scope. So it is appropriate to limit this function in the local
scope.

Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/alloc.c
include/linux/mlx5/driver.h

index 549f962cd86e5eacd74682c8bf75ee31e2dfea01..42198e64a7f49b03de260c24aff91c491c0cb0fb 100644 (file)
@@ -71,8 +71,8 @@ static void *mlx5_dma_zalloc_coherent_node(struct mlx5_core_dev *dev,
        return cpu_handle;
 }
 
-int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
-                       struct mlx5_frag_buf *buf, int node)
+static int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
+                              struct mlx5_frag_buf *buf, int node)
 {
        dma_addr_t t;
 
index 27200dea029776a20c64468a1ed2a4125edd1a67..59cff380f41a5f1f4bd85e9034c54ae7bdf77737 100644 (file)
@@ -928,8 +928,6 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev);
 void mlx5_stop_health_poll(struct mlx5_core_dev *dev, bool disable_health);
 void mlx5_drain_health_wq(struct mlx5_core_dev *dev);
 void mlx5_trigger_health_work(struct mlx5_core_dev *dev);
-int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
-                       struct mlx5_frag_buf *buf, int node);
 int mlx5_buf_alloc(struct mlx5_core_dev *dev,
                   int size, struct mlx5_frag_buf *buf);
 void mlx5_buf_free(struct mlx5_core_dev *dev, struct mlx5_frag_buf *buf);