From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: isubramanian@apm.com, kchudgar@apm.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: xgene: fix backward compatibility fix
Date: Thu, 01 Sep 2016 10:01:08 -0700 (PDT) [thread overview]
Message-ID: <20160901.100108.1348875318377995073.davem@davemloft.net> (raw)
In-Reply-To: <20160829123740.3336010-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 29 Aug 2016 14:37:14 +0200
> A bugfix for backward compatibility handling introduced undefined
> behavior for the case that of_parse_phandle() does not return
> a valid entry, as "gcc -Wmaybe-unused" reports:
>
> drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_phy_connect':
> drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> drivers/net/ethernet/apm/xgene/xgene_enet_hw.c: In function 'xgene_enet_mdio_config':
> drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:776:6: error: 'phy_dev' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> We can work around this by removing the check for zero "np", as
> of_phy_connect() will correctly handle a NULL argument so we fall
> back into the normal error handling case.
>
> Note that I had previously fixed another bug that resulted in the
> exact same warning, but this is a different problem that was
> introduced after my original fix.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 03377e381bf4 ("drivers: net: xgene: Fix backward compatibility")
Applied.
prev parent reply other threads:[~2016-09-01 17:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 12:37 [PATCH] net: xgene: fix backward compatibility fix Arnd Bergmann
2016-09-01 17:01 ` 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=20160901.100108.1348875318377995073.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=isubramanian@apm.com \
--cc=kchudgar@apm.com \
--cc=linux-kernel@vger.kernel.org \
--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 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).