From: Saeed Mahameed <saeed@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>,
Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH net-next] net/mlx5: Add esw assignment back in mlx5e_tc_sample_unoffload()
Date: Wed, 27 Oct 2021 22:29:46 -0700 [thread overview]
Message-ID: <1f893c71400a8193f8e1637b17bc4196c52293cd.camel@kernel.org> (raw)
In-Reply-To: <20211027153122.3224673-1-nathan@kernel.org>
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@kernel.org>
Nice catch !
applied to net-next-mlx5,
Thanks !
prev parent reply other threads:[~2021-10-28 5:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 15:31 [PATCH net-next] net/mlx5: Add esw assignment back in mlx5e_tc_sample_unoffload() Nathan Chancellor
2021-10-28 5:29 ` Saeed Mahameed [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f893c71400a8193f8e1637b17bc4196c52293cd.camel@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.