From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Steve Glendinning <steve.glendinning@shawell.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] smsc911x: remove superfluous variable init
Date: Tue, 21 Mar 2023 15:27:02 +0100 [thread overview]
Message-ID: <CAMuHMdXrvdUPTs=ExXJo-WM+=A=WgyCQM_0mGKZxQOrVFePbwA@mail.gmail.com> (raw)
In-Reply-To: <20230321114721.20531-1-wsa+renesas@sang-engineering.com>
Hi Wolfram,
On Tue, Mar 21, 2023 at 12:50 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> phydev is assigned a value right away, no need to initialize it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Thanks for your patch!
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> --- a/drivers/net/ethernet/smsc/smsc911x.c
> +++ b/drivers/net/ethernet/smsc/smsc911x.c
> @@ -1016,7 +1016,7 @@ static void smsc911x_phy_adjust_link(struct net_device *dev)
> static int smsc911x_mii_probe(struct net_device *dev)
> {
> struct smsc911x_data *pdata = netdev_priv(dev);
> - struct phy_device *phydev = NULL;
> + struct phy_device *phydev;
> int ret;
>
> phydev = phy_find_first(pdata->mii_bus);
Nit: perhaps combine this assignment with the variable declaration?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2023-03-21 14:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 11:47 [PATCH net-next] smsc911x: remove superfluous variable init Wolfram Sang
2023-03-21 14:27 ` Geert Uytterhoeven [this message]
2023-03-21 14:38 ` Wolfram Sang
2023-03-21 19:27 ` Jakub Kicinski
2023-03-22 14:58 ` Paolo Abeni
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='CAMuHMdXrvdUPTs=ExXJo-WM+=A=WgyCQM_0mGKZxQOrVFePbwA@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steve.glendinning@shawell.net \
--cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).