From: Florian Fainelli <f.fainelli@gmail.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
"David S. Miller" <davem@davemloft.net>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Fugang Duan <fugang.duan@nxp.com>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Jose Abreu <joabreu@synopsys.com>,
Woojung Huh <woojung.huh@microchip.com>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Antoine Tenart <antoine.tenart@free-electrons.com>,
Tobias Jordan <Tobias.Jordan@elektrobit.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Thomas
Subject: Re: [PATCH net-next 2/2] drivers: net: Remove device_node checks with of_mdiobus_register()
Date: Tue, 15 May 2018 15:59:58 -0700 [thread overview]
Message-ID: <b3073c3b-7f97-c24d-1c4f-7459a5b70f1b@gmail.com> (raw)
In-Reply-To: <1112dc66-5300-89f8-8382-ceb7a024e933@ti.com>
On 05/15/2018 03:57 PM, Grygorii Strashko wrote:
>
>
> On 05/15/2018 04:59 PM, Florian Fainelli wrote:
>> A number of drivers have the following pattern:
>>
>> if (np)
>> of_mdiobus_register()
>> else
>> mdiobus_register()
>>
>> which the implementation of of_mdiobus_register() now takes care of.
>> Remove that pattern in drivers that strictly adhere to it.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>> drivers/net/dsa/bcm_sf2.c | 8 ++------
>> drivers/net/dsa/mv88e6xxx/chip.c | 5 +----
>> drivers/net/ethernet/cadence/macb_main.c | 12 +++---------
>> drivers/net/ethernet/freescale/fec_main.c | 8 ++------
>> drivers/net/ethernet/marvell/mvmdio.c | 5 +----
>> drivers/net/ethernet/renesas/sh_eth.c | 11 +++--------
>> drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 5 +----
>> drivers/net/ethernet/ti/davinci_mdio.c | 6 ++----
>> drivers/net/phy/mdio-gpio.c | 6 +-----
>> drivers/net/phy/mdio-mscc-miim.c | 6 +-----
>> drivers/net/usb/lan78xx.c | 7 ++-----
>> 11 files changed, 19 insertions(+), 60 deletions(-)
>>
>
> ...
>
>> goto bus_register_fail;
>> diff --git a/drivers/net/ethernet/ti/davinci_mdio.c
>> b/drivers/net/ethernet/ti/davinci_mdio.c
>> index 98a1c97fb95e..e720244e7f71 100644
>> --- a/drivers/net/ethernet/ti/davinci_mdio.c
>> +++ b/drivers/net/ethernet/ti/davinci_mdio.c
>> @@ -431,10 +431,8 @@ static int davinci_mdio_probe(struct
>> platform_device *pdev)
>> */
>> if (dev->of_node && of_get_child_count(dev->of_node)) {
>
> It causes build error due to "{" above.
Humpf, shame on me for not enabling that driver, thanks for catching this!
>
>> data->skip_scan = true;
>> - ret = of_mdiobus_register(data->bus, dev->of_node);
>> - } else {
>> - ret = mdiobus_register(data->bus);
>> - }
>> +
>> + ret = of_mdiobus_register(data->bus, dev->of_node);
>> if (ret)
>> goto bail_out;
>> diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
>> index b501221819e1..4e4c8daf44c3 100644
>> --- a/drivers/net/phy/mdio-gpio.c
>> +++ b/drivers/net/phy/mdio-gpio.c
>> @@ -179,11 +179,7 @@ static int mdio_gpio_probe(struct platform_device
>> *pdev)
>
> [...]
>
--
Florian
next prev parent reply other threads:[~2018-05-15 22:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 21:59 [PATCH net-next 0/2] of: mdio: Fall back to mdiobus_register() with np is NULL Florian Fainelli
2018-05-15 21:59 ` [PATCH net-next 1/2] " Florian Fainelli
2018-05-15 21:59 ` [PATCH net-next 2/2] drivers: net: Remove device_node checks with of_mdiobus_register() Florian Fainelli
2018-05-15 22:57 ` Grygorii Strashko
2018-05-15 22:59 ` Florian Fainelli [this message]
2018-05-16 16:33 ` kbuild test robot
2018-05-16 17:05 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3073c3b-7f97-c24d-1c4f-7459a5b70f1b@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Tobias.Jordan@elektrobit.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.torgue@st.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@free-electrons.com \
--cc=davem@davemloft.net \
--cc=frowand.list@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=geert+renesas@glider.be \
--cc=grygorii.strashko@ti.com \
--cc=joabreu@synopsys.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=peppe.cavallaro@st.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh+dt@kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=vivien.didelot@savoirfairelinux.com \
--cc=woojung.huh@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).