From: Wolfgang Denk Date: Sun, 19 Dec 2010 00:07:07 +0100 Subject: [U-Boot] [PATCH v2] ftgmac100: support of gigabit eth ftgmac100 In-Reply-To: <1292383883-24272-1-git-send-email-macpaul@andestech.com> References: <1292383883-24272-1-git-send-email-macpaul@andestech.com> Message-ID: <20101218230707.ACFC81524E8@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Macpaul Lin, In message <1292383883-24272-1-git-send-email-macpaul@andestech.com> you wrote: > Add Faraday's ftgmac100 (gigabit ethernet) > MAC controller's driver. > > Signed-off-by: Macpaul Lin ... > --- /dev/null > +++ b/drivers/net/ftgmac100.c ... > +}; > + > + Only one blank line, please. > +/****************************************************************************** > + * struct mii_bus functions > + *****************************************************************************/ Incorrect multi-line comment style. Please fix globally. > +int ftgmac100_phy_read(struct eth_device *dev, int addr, > + int reg, u16 *value) > +{ > + *value = ftgmac100_mdiobus_read(dev , addr, reg); > + > + if (*value == -1) > + return -1; > + else > + return 0; > +} Drop the else and unindent the return 0; > +int ftgmac100_phy_write(struct eth_device *dev, int addr, > + int reg, u16 value) > +{ > + if (ftgmac100_mdiobus_write(dev, addr, reg, value) == -1) > + return -1; > + else > + return 0; > +} Ditto. Please fix globally. > + ftgmac100_phy_write(dev, priv->phy_addr, > + MII_ADVERTISE, adv); Make this a single line, please. [Same globally where applicable] > + if (!(status & BMSR_LSTATUS)) { > + printf("%s: link down\n", dev->name); > + return 0; > + } else { Remove else and unindent the rest. > +#ifdef CONFIG_FTGMAC100_EGIGA > + if (stat_ge & LPA_1000FULL) > + /* set gmac for 1000BaseTX and Full Duplex */ > + maccr |= FTGMAC100_MACCR_GIGA_MODE | FTGMAC100_MACCR_FULLDUP; > + > + if (stat_ge & LPA_1000HALF) > + /* set gmac for 1000BaseTX and Half Duplex */ > + maccr |= FTGMAC100_MACCR_GIGA_MODE; Braces needed for multi-line statements. Please fix globally. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I had the rare misfortune of being one of the first people to try and implement a PL/1 compiler. -- T. Cheatham