[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200702011154.49558.jens@de.ibm.com>
Date: Thu, 1 Feb 2007 11:54:49 +0100
From: Jens Osterkamp <jens@...ibm.com>
To: Francois Romieu <romieu@...zoreil.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Ishizaki Kou <kou.ishizaki@...hiba.co.jp>,
linuxppc-dev@...abs.org, netdev@...r.kernel.org,
cbe-oss-dev@...abs.org, Linas Vepstas <linas@...tin.ibm.com>,
jgarzik@...ox.com, James K Lewis <jim@...ewis.com>
Subject: Re: spidernet: add improved phy support in sungem_phy.c
Francois,
thank you for your comments. I'll send a revised patch soon.
> +#define BCM5421_MODE_MASK 1 << 5
>
> Please add parenthesis.
Done.
> "&" is fine despite the lack of parenthesis above but it is error-prone.
Corrected.
>
> +
> + if ( mode == GMII_COPPER) {
> ^^^
> + return genmii_poll_link(phy);
> + }
>
> No curly-braces for single line statements please.
I corrected this on all my additions.
> Ternary operator ?
I dont like ternary operators. Yes, I know, they are cool, but
they make the code much less readable IMHO.
> +#define BCM5461_FIBER_LINK 1 << 2
> +#define BCM5461_MODE_MASK 3 << 1
>
> Please add parenthesis.
Done.
> Join the dark side and use a ternary operator.
See above.
> +static int bcm5461_enable_fiber(struct mii_phy* phy, int autoneg)
> +{
> + /*
> + phy_write(phy, MII_NCONFIG, 0xfc0c);
> + phy_write(phy, MII_BMCR, 0x4140);
> + */
>
> Remove ?
Done.
Jens
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists