netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: f.fainelli@gmail.com, xypron.glpk@gmx.de,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, tremyfr@gmail.com
Subject: Re: [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.

  reply	other threads:[~2017-01-20 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 14:52 [PATCH 1/3] cxgb4: hide unused warnings Arnd Bergmann
2017-01-18 14:52 ` [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection Arnd Bergmann
2017-01-19 13:13   ` Mintz, Yuval
2017-01-20 16:44   ` David Miller
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]
2017-01-20 16:15 ` [PATCH 1/3] cxgb4: hide unused warnings David Miller

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=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tremyfr@gmail.com \
    --cc=xypron.glpk@gmx.de \
    /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).