lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f87b61499831bdc4100f7959d3a95c58c488df1d.camel@mellanox.com>
Date:   Tue, 17 Dec 2019 19:44:09 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Yanjun Zhu <yanjunz@...lanox.com>,
        "leon@...nel.org" <leon@...nel.org>
CC:     "zyjzyj2000@...il.com" <zyjzyj2000@...il.com>
Subject: Re: [PATCH 1/1] net/mlx5: limit the function in local scope

On Sat, 2019-12-14 at 10:51 +0200, Zhu Yanjun wrote:
> From: Zhu Yanjun <zyjzyj2000@...il.com>
> 
> 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@...il.com>

LGTM, will apply to mlx5-next soon.

Thanks,
Saeed.

> ---
>  drivers/net/ethernet/mellanox/mlx5/core/alloc.c | 4 ++--
>  include/linux/mlx5/driver.h                     | 2 --
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
> b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
> index 549f962..42198e6 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
> @@ -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;
>  
> diff --git a/include/linux/mlx5/driver.h
> b/include/linux/mlx5/driver.h
> index 27200de..59cff38 100644
> --- a/include/linux/mlx5/driver.h
> +++ b/include/linux/mlx5/driver.h
> @@ -928,8 +928,6 @@ int mlx5_cmd_exec_polling(struct mlx5_core_dev
> *dev, void *in, int in_size,
>  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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ