[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1f893c71400a8193f8e1637b17bc4196c52293cd.camel@kernel.org>
Date: Wed, 27 Oct 2021 22:29:46 -0700
From: Saeed Mahameed <saeed@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>,
Leon Romanovsky <leon@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH net-next] net/mlx5: Add esw assignment back in
mlx5e_tc_sample_unoffload()
On Wed, 2021-10-27 at 08:31 -0700, Nathan Chancellor wrote:
> Clang warns:
>
> drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c:635:34: error:
> variable 'esw' is uninitialized when used here [-Werror,-
> Wuninitialized]
> mlx5_eswitch_del_offloaded_rule(esw, sample_flow->pre_rule,
> sample_flow->pre_attr);
> ^~~
> drivers/net/ethernet/mellanox/mlx5/core/en/tc/sample.c:626:26: note:
> initialize the variable 'esw' to silence this warning
> struct mlx5_eswitch *esw;
> ^
> = NULL
> 1 error generated.
>
> It appears that the assignment should have been shuffled instead of
> removed outright like in mlx5e_tc_sample_offload(). Add it back so
> there
> is no use of esw uninitialized.
>
> Fixes: a64c5edbd20e ("net/mlx5: Remove unnecessary checks for slow
> path flag")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1494
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
Nice catch !
applied to net-next-mlx5,
Thanks !
Powered by blists - more mailing lists