[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180312215738.GA3674@lunn.ch>
Date: Mon, 12 Mar 2018 22:57:38 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Brad Mouring <brad.mouring@...com>
Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>,
Rob Herring <robh+dt@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Michael Grzeschik <m.grzeschik@...gutronix.de>,
Mark Rutland <mark.rutland@....com>, netdev@...r.kernel.org,
Julia Cartwright <julia@...com>, devicetree@...r.kernel.org
Subject: Re: [PATCH v4 net-next 3/4] net: macb: Add phy-handle DT support
> + /* attempt to find a phy-handle */
> + if (!(bp->phy_node = of_parse_phandle(np, "phy-handle", 0))) {
> +
> + /* fallback to standard phy registration if no phy were
> + * found during dt phy registration
> + */
> + if (!phy_find_first(bp->mii_bus)) {
> + for (i = 0; i < PHY_MAX_ADDR; i++) {
> + struct phy_device *phydev;
> +
> + phydev = mdiobus_scan(bp->mii_bus, i);
> + if (IS_ERR(phydev) &&
> + PTR_ERR(phydev) != -ENODEV) {
> + ret = PTR_ERR(phydev);
> + break;
> + }
Hi Brad
./scipts/checkpatch.pl ~/brad.mouring
WARNING: line over 80 characters
#122: FILE: drivers/net/ethernet/cadence/macb_main.c:492:
+ if (!(bp->phy_node = of_parse_phandle(np, "phy-handle", 0))) {
ERROR: do not use assignment in if condition
#122: FILE: drivers/net/ethernet/cadence/macb_main.c:492:
+ if (!(bp->phy_node = of_parse_phandle(np, "phy-handle", 0))) {
CHECK: Blank lines aren't necessary after an open brace '{'
#123: FILE: drivers/net/ethernet/cadence/macb_main.c:493:
+ if (!(bp->phy_node = of_parse_phandle(np, "phy-handle", 0))) {
+
WARNING: line over 80 characters
#124: FILE: drivers/net/ethernet/cadence/macb_main.c:494:
+ /* fallback to standard phy registration if no phy were
ERROR: trailing whitespace
#130: FILE: drivers/net/ethernet/cadence/macb_main.c:500:
+^I$
WARNING: line over 80 characters
#131: FILE: drivers/net/ethernet/cadence/macb_main.c:501:
+ phydev = mdiobus_scan(bp->mii_bus, i);
WARNING: Too many leading tabs - consider code refactoring
#132: FILE: drivers/net/ethernet/cadence/macb_main.c:502:
+ if (IS_ERR(phydev) &&
etc
Andrew
Powered by blists - more mailing lists