From: Andrew Lunn <andrew@lunn.ch>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Ameen Ali <ameenali023@gmail.com>,
jason@lakedaemon.net, sebastian.hesselbarth@gmail.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 7/7] common.c:105 Variable 'gephy' is never used.
Date: Fri, 13 Mar 2015 15:48:40 +0100 [thread overview]
Message-ID: <20150313144840.GA7311@lunn.ch> (raw)
In-Reply-To: <20150313141926.GM8656@n2100.arm.linux.org.uk>
On Fri, Mar 13, 2015 at 02:19:26PM +0000, Russell King - ARM Linux wrote:
> On Fri, Mar 13, 2015 at 03:44:24PM +0200, Ameen Ali wrote:
> > Variable 'gephy' is assigned a value that is never used.
> >
> > Signed-off-by : <AmeenALi023@gmail.com>
> > ---
> > arch/arm/mach-dove/common.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
> > index 0d1a892..115a413 100644
> > --- a/arch/arm/mach-dove/common.c
> > +++ b/arch/arm/mach-dove/common.c
> > @@ -113,7 +113,7 @@ static void __init dove_clk_init(void)
> > orion_clkdev_add(NULL, "orion_spi.1", tclk);
> > orion_clkdev_add(NULL, "orion_wdt", tclk);
> > orion_clkdev_add(NULL, "mv64xxx_i2c.0", tclk);
> > -
> > + orion_clkdev_add(NULL,"mv643xx_eth_port.0",gephy);
>
> NAK. Just because some variable isn't read doesn't mean that you need
> to dream up some way to make it used.
>
> In any case, this is wrong because it will duplicate this entry:
>
> > orion_clkdev_add(NULL, "mv643xx_eth_port.0", ge);
Hi Russell
Missed that. Sorry.
What happens in the DT world is that ge clock is a child of the gephy
clock, so that when you enable the ge clock, it walks up towards the
parent and enables the gephy clock.
I don't see anything like this in the legacy Dove world. Are you just
relying on the bootloader turning on the phy and nothing turning it
off?
Andrew
next prev parent reply other threads:[~2015-03-13 14:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 13:44 [PATCH 7/7] common.c:105 Variable 'gephy' is never used Ameen Ali
2015-03-13 14:08 ` Andrew Lunn
2015-03-13 14:19 ` Russell King - ARM Linux
2015-03-13 14:48 ` Andrew Lunn [this message]
2015-03-13 15:18 ` Russell King - ARM Linux
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=20150313144840.GA7311@lunn.ch \
--to=andrew@lunn.ch \
--cc=ameenali023@gmail.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sebastian.hesselbarth@gmail.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