All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Walter Harms <wharms@bfs.de>
Cc: Mao Wenan <maowenan@huawei.com>,
	kernel-janitors@vger.kernel.org, netdev@vger.kernel.org,
	john.fastabend@gmail.com, hawk@kernel.org,
	jakub.kicinski@netronome.com, daniel@iogearbox.net,
	ast@kernel.org, julia.lawall@lip6.fr
Subject: Re: [PATCH v3] net: ns83820: code cleanup for ns83820_probe_phy()
Date: Tue, 19 Feb 2019 17:46:42 +0000	[thread overview]
Message-ID: <20190219174642.GD13075@lunn.ch> (raw)
In-Reply-To: <715767253.151509.1550580124264@ox-groupware.bfs.de>

> >  	for (i=1; i<2; i++) {
> 
> 
> the loop here seems also pointless, so you can eliminate i.
> (or did i muss something ?)

If you widen out your view a bit, you find all this code is inside a
#ifdef PHY_CODE_IS_FINISHED. I don't see anything which actually
defines that.

So a lot more code could probably be removed.

   Andrew

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Walter Harms <wharms@bfs.de>
Cc: Mao Wenan <maowenan@huawei.com>,
	kernel-janitors@vger.kernel.org, netdev@vger.kernel.org,
	john.fastabend@gmail.com, hawk@kernel.org,
	jakub.kicinski@netronome.com, daniel@iogearbox.net,
	ast@kernel.org, julia.lawall@lip6.fr
Subject: Re: [PATCH v3] net: ns83820: code cleanup for ns83820_probe_phy()
Date: Tue, 19 Feb 2019 18:46:42 +0100	[thread overview]
Message-ID: <20190219174642.GD13075@lunn.ch> (raw)
In-Reply-To: <715767253.151509.1550580124264@ox-groupware.bfs.de>

> >  	for (i=1; i<2; i++) {
> 
> 
> the loop here seems also pointless, so you can eliminate i.
> (or did i muss something ?)

If you widen out your view a bit, you find all this code is inside a
#ifdef PHY_CODE_IS_FINISHED. I don't see anything which actually
defines that.

So a lot more code could probably be removed.

   Andrew

  parent reply	other threads:[~2019-02-19 17:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  8:53 [PATCH v3] net: ns83820: code cleanup for ns83820_probe_phy() Mao Wenan
2019-02-19  9:06 ` Mao Wenan
2019-02-19  9:04 ` Julia Lawall
2019-02-19  9:04   ` Julia Lawall
2019-02-19 12:40 ` walter harms
2019-02-19 12:40   ` walter harms
2019-02-19 12:42 ` Walter Harms
2019-02-19 12:42   ` Walter Harms
2019-02-19 12:52   ` maowenan
2019-02-19 12:52     ` maowenan
2019-02-19 14:23   ` Dan Carpenter
2019-02-19 14:23     ` Dan Carpenter
2019-02-19 17:46   ` Andrew Lunn [this message]
2019-02-19 17:46     ` Andrew Lunn
2019-02-19 21:25 ` David Miller
2019-02-19 21:25   ` 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=20190219174642.GD13075@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hawk@kernel.org \
    --cc=jakub.kicinski@netronome.com \
    --cc=john.fastabend@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=wharms@bfs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.