
Hi Francios,
On Wed, Nov 5, 2014 at 6:30 AM, Francois Retief fgretief@spaceteq.co.za wrote:
Added MDIO support to the Aeroflex Gaisler GRETH driver. The result is that we can now use the CONFIG_CMD_MII commands to access the PHY chip.
Signed-off-by: Francois Retief fgretief@spaceteq.co.za
I noticed this still sitting in patchwork. I attempted to apply it, but it fails checkpatch.pl.
WARNING: please, no spaces at the start of a line #41: FILE: drivers/net/greth.c:57: + struct mii_dev *bus;$
WARNING: line over 80 characters #51: FILE: drivers/net/greth.c:132: +static int greth_mdio_read(struct mii_dev *bus, int port_addr, int dev_addr, int regnum)
WARNING: please, no spaces at the start of a line #53: FILE: drivers/net/greth.c:134: + greth_regs *regs = (greth_regs *)bus->priv;$
WARNING: line over 80 characters #55: FILE: drivers/net/greth.c:136: + debug("GRETH: mdio_read (port_addr=%d, dev_addr=%d, reg=%d)\n", port_addr, dev_addr, regnum);
WARNING: please, no spaces at the start of a line #55: FILE: drivers/net/greth.c:136: + debug("GRETH: mdio_read (port_addr=%d, dev_addr=%d, reg=%d)\n", port_addr, dev_addr, regnum);$
WARNING: please, no spaces at the start of a line #57: FILE: drivers/net/greth.c:138: + return read_mii(port_addr, regnum, regs);$
WARNING: line over 80 characters #60: FILE: drivers/net/greth.c:141: +static int greth_mdio_write(struct mii_dev *bus, int port_addr, int dev_addr, int regnum, u16 value)
WARNING: please, no spaces at the start of a line #62: FILE: drivers/net/greth.c:143: + greth_regs *regs = (greth_regs *)bus->priv;$
WARNING: line over 80 characters #64: FILE: drivers/net/greth.c:145: + debug("GRETH: mdio_write (port_addr=%d, dev_addr=%d, reg=%d, value=%d)\n", port_addr, dev_addr, regnum, value);
WARNING: please, no spaces at the start of a line #64: FILE: drivers/net/greth.c:145: + debug("GRETH: mdio_write (port_addr=%d, dev_addr=%d, reg=%d, value=%d)\n", port_addr, dev_addr, regnum, value);$
WARNING: please, no spaces at the start of a line #66: FILE: drivers/net/greth.c:147: + write_mii(port_addr, regnum, value, regs);$
WARNING: please, no spaces at the start of a line #67: FILE: drivers/net/greth.c:148: + return 0;$
WARNING: please, no spaces at the start of a line #72: FILE: drivers/net/greth.c:153: + puts("GRETH: Reset PHY via MDIO reset\n");$
WARNING: please, no spaces at the start of a line #73: FILE: drivers/net/greth.c:154: + return 0;$
WARNING: please, no spaces at the start of a line #78: FILE: drivers/net/greth.c:159: + struct mii_dev *bus = mdio_alloc();$
WARNING: please, no spaces at the start of a line #80: FILE: drivers/net/greth.c:161: + if (!bus) {$
WARNING: suspect code indent for conditional statements (7, 15) #80: FILE: drivers/net/greth.c:161: + if (!bus) { + printf("GRETH: Failed to allocate MDIO bus\n");
ERROR: code indent should use tabs where possible #81: FILE: drivers/net/greth.c:162: + printf("GRETH: Failed to allocate MDIO bus\n");$
WARNING: please, no spaces at the start of a line #81: FILE: drivers/net/greth.c:162: + printf("GRETH: Failed to allocate MDIO bus\n");$
ERROR: code indent should use tabs where possible #82: FILE: drivers/net/greth.c:163: + return -ENOMEM;$
WARNING: please, no spaces at the start of a line #82: FILE: drivers/net/greth.c:163: + return -ENOMEM;$
WARNING: please, no spaces at the start of a line #83: FILE: drivers/net/greth.c:164: + }$
WARNING: please, no spaces at the start of a line #85: FILE: drivers/net/greth.c:166: + bus->read = greth_mdio_read;$
WARNING: please, no spaces at the start of a line #86: FILE: drivers/net/greth.c:167: + bus->write = greth_mdio_write;$
WARNING: please, no spaces at the start of a line #87: FILE: drivers/net/greth.c:168: + bus->reset = greth_mdio_reset;$
WARNING: please, no spaces at the start of a line #88: FILE: drivers/net/greth.c:169: + sprintf(bus->name, "GRETH%d", 0);$
WARNING: please, no spaces at the start of a line #90: FILE: drivers/net/greth.c:171: + bus->priv = (void *)greth->regs;$
WARNING: please, no spaces at the start of a line #91: FILE: drivers/net/greth.c:172: + greth->bus = bus;$
WARNING: please, no spaces at the start of a line #93: FILE: drivers/net/greth.c:174: + return mdio_register(bus);$
WARNING: line over 80 characters #97: FILE: drivers/net/greth.c:178: +static inline int greth_mdio_register(greth_priv *greth, bd_t *bis) { return 0; }
WARNING: please, no spaces at the start of a line #108: FILE: drivers/net/greth.c:691: + greth_mdio_register(greth, bis);$
total: 2 errors, 29 warnings, 0 checks, 81 lines checked
NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or scripts/cleanfile
Please clean up and repost.
Thanks, -Joe