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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4811ee1d-45d7-c484-f4f0-20228afc048b@intel.com>
Date: Tue, 1 Aug 2023 10:55:13 -0700
From: Jesse Brandeburg <jesse.brandeburg@...el.com>
To: Ruan Jinjie <ruanjinjie@...wei.com>, <tariqt@...dia.com>,
	<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <linux-rdma@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net/mlx4: remove many unnecessary NULL values

On 8/1/2023 5:34 AM, Ruan Jinjie wrote:
> Ther are many pointers assigned first, which need not to be initialized, so
> remove the NULL assignment.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@...wei.com>

Thanks for your patch, make sure you're always explaining "why" you're
making a change in your commit message.

but see below please.

> ---
>  drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 10 +++++-----
>  drivers/net/ethernet/mellanox/mlx4/en_netdev.c  |  4 ++--
>  drivers/net/ethernet/mellanox/mlx4/main.c       | 12 ++++++------
>  3 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> index 7d45f1d55f79..164a13272faa 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
> @@ -1467,8 +1467,8 @@ static int add_ip_rule(struct mlx4_en_priv *priv,
>  		       struct list_head *list_h)
>  {
>  	int err;
> -	struct mlx4_spec_list *spec_l2 = NULL;
> -	struct mlx4_spec_list *spec_l3 = NULL;
> +	struct mlx4_spec_list *spec_l2;
> +	struct mlx4_spec_list *spec_l3;

What sequence of commands did you use to identify this set of things to
change? That would be useful data for the commit message.

gcc with -Wunused-something?
cppcheck?

I've sent these types of patches before, but they've been rejected as
churn if they don't fix a clear W=1 or C=2 warning.

Did you run the above and see these issues?


>  	struct ethtool_usrip4_spec *l3_mask = &cmd->fs.m_u.usr_ip4_spec;
>  
>  	spec_l3 = kzalloc(sizeof(*spec_l3), GFP_KERNEL);
> @@ -1505,9 +1505,9 @@ static int add_tcp_udp_rule(struct mlx4_en_priv *priv,
>  			     struct list_head *list_h, int proto)
>  {
>  	int err;
> -	struct mlx4_spec_list *spec_l2 = NULL;
> -	struct mlx4_spec_list *spec_l3 = NULL;
> -	struct mlx4_spec_list *spec_l4 = NULL;
> +	struct mlx4_spec_list *spec_l2;
> +	struct mlx4_spec_list *spec_l3;
> +	struct mlx4_spec_list *spec_l4;
>  	struct ethtool_tcpip4_spec *l4_mask = &cmd->fs.m_u.tcp_ip4_spec;
>  
>  	spec_l2 = kzalloc(sizeof(*spec_l2), GFP_KERNEL);

I suggest if you want to have these kind of changes committed you spend
more time to make a detailed commit message and explain what's going on
for the change as otherwise it's not going to be accepted.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ