
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 macpaul@andestech.com
...
--- /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