From: davem@davemloft.net (David Miller)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] bcm63xx_enet: avoid uninitialized variable warning
Date: Fri, 20 Jan 2017 11:46:00 -0500 (EST) [thread overview]
Message-ID: <20170120.114600.1285813871724893800.davem@davemloft.net> (raw)
In-Reply-To: <20170118145306.1004008-3-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Wed, 18 Jan 2017 15:52:53 +0100
> gcc-7 and probably earlier versions get confused by this function
> and print a harmless warning:
>
> drivers/net/ethernet/broadcom/bcm63xx_enet.c: In function 'bcm_enet_open':
> drivers/net/ethernet/broadcom/bcm63xx_enet.c:1130:3: error: 'phydev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> This adds an initialization for the 'phydev' variable when it is unused
> and changes the check to test for that NULL pointer to make it clear
> that we always pass a valid pointer here.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Also applied, thanks.
prev parent reply other threads:[~2017-01-20 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170118145306.1004008-1-arnd@arndb.de>
2017-01-18 14:52 ` [PATCH 3/3] bcm63xx_enet: avoid uninitialized variable warning Arnd Bergmann
2017-01-20 16:46 ` David Miller [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=20170120.114600.1285813871724893800.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).