public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Mat Martineau <martineau@kernel.org>
To: John Hubbard <jhubbard@nvidia.com>
Cc: "Shuah Khan" <shuah@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Steffen Klassert" <steffen.klassert@secunet.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Andreas Färber" <afaerber@suse.de>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Matthieu Baerts" <matttbe@kernel.org>,
	"Geliang Tang" <geliang@kernel.org>,
	"Pravin B Shelar" <pshelar@ovn.org>,
	"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
	"Alexander Mikhalitsyn" <alexander@mihalicyn.com>,
	zhujun2 <zhujun2@cmss.chinamobile.com>,
	"Petr Machata" <petrm@nvidia.com>,
	"Ido Schimmel" <idosch@nvidia.com>,
	"Hangbin Liu" <liuhangbin@gmail.com>,
	"Nikolay Aleksandrov" <razor@blackwall.org>,
	"Benjamin Poirier" <bpoirier@nvidia.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Dmitry Safonov" <0x7f454c46@gmail.com>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-actions@lists.infradead.org, mptcp@lists.linux.dev,
	dev@openvswitch.org, "Valentin Obst" <kernel@valentinobst.de>,
	linux-kselftest@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	llvm@lists.linux.dev
Subject: Re: [PATCH v2] selftests/net: fix uninitialized variables
Date: Mon, 6 May 2024 18:27:07 -0700 (PDT)	[thread overview]
Message-ID: <610f9818-b899-1f70-8110-f88db47595ff@kernel.org> (raw)
In-Reply-To: <20240506190204.28497-1-jhubbard@nvidia.com>

On Mon, 6 May 2024, John Hubbard wrote:

> When building with clang, via:
>
>    make LLVM=1 -C tools/testing/selftest
>
> ...clang warns about three variables that are not initialized in all
> cases:
>
> 1) The opt_ipproto_off variable is used uninitialized if "testname" is
> not "ip". Willem de Bruijn pointed out that this is an actual bug, and
> suggested the fix that I'm using here (thanks!).
>
> 2) The addr_len is used uninitialized, but only in the assert case,
>   which bails out, so this is harmless.
>
> 3) The family variable in add_listener() is only used uninitialized in
>   the error case (neither IPv4 nor IPv6 is specified), so it's also
>   harmless.
>
> Fix by initializing each variable.
>
> Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>

Hi John -

MPTCP change looks good to me:

Acked-by: Mat Martineau <martineau@kernel.org>


  parent reply	other threads:[~2024-05-07  1:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 19:02 [PATCH v2] selftests/net: fix uninitialized variables John Hubbard
2024-05-06 19:23 ` Willem de Bruijn
2024-05-07  1:27 ` Mat Martineau [this message]
2024-05-08  0:30 ` patchwork-bot+netdevbpf

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=610f9818-b899-1f70-8110-f88db47595ff@kernel.org \
    --to=martineau@kernel.org \
    --cc=0x7f454c46@gmail.com \
    --cc=afaerber@suse.de \
    --cc=alexander@mihalicyn.com \
    --cc=bigeasy@linutronix.de \
    --cc=bpoirier@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=edumazet@google.com \
    --cc=geliang@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=idosch@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=kernel@valentinobst.de \
    --cc=kuba@kernel.org \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=llvm@lists.linux.dev \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=pshelar@ovn.org \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=zhujun2@cmss.chinamobile.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox