From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
Aida Mynzhasova <aida.mynzhasova@skitlab.ru>,
Richard Cochran <richardcochran@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
Claudiu Manoil <claudiu.manoil@freescale.com>,
Vitaly Bordug <vbordug@ru.mvista.com>,
Grant Likely <grant.likely@linaro.org>,
"open list:LINUX FOR POWERPC..." <linuxppc-dev@lists.ozlabs.org>,
davem@davemloft.net
Subject: Re: [PATCH RESEND net-next 5/9] fs_enet: use the new fixed PHY helpers
Date: Thu, 22 May 2014 01:58:12 +0400 [thread overview]
Message-ID: <537D2174.8040405@cogentembedded.com> (raw)
In-Reply-To: <1400708331-18088-6-git-send-email-f.fainelli@gmail.com>
On 05/22/2014 01:38 AM, Florian Fainelli wrote:
> of_phy_connect_fixed_link() is becoming obsolete, and also required
> platform code to register the fixed PHYs at the specified addresses for
> those to be usable. Get rid of it and use the new of_phy_is_fixed_link()
> plus of_phy_register_fixed_link() helpers to transition over the new
> scheme.
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
> diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> index dc80db41d6b3..d602711e00e9 100644
> --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
[...]
> @@ -1029,9 +1025,15 @@ static int fs_enet_probe(struct platform_device *ofdev)
> fpi->use_napi = 1;
> fpi->napi_weight = 17;
> fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
> - if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link",
> - NULL)))
> - goto out_free_fpi;
> + if (!fpi->phy_node) {
> + if (of_phy_is_fixed_link(ofdev->dev.of_node)) {
These two *if* statements could be collapsed, reducing the indentation
level below.
> + err = of_phy_register_fixed_link(ofdev->dev.of_node);
> + if (err)
> + goto out_free_fpi;
> +
> + fpi->phy_node = ofdev->dev.of_node;
> + }
> + }
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: Florian Fainelli
<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
Pantelis Antoniou
<pantelis.antoniou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Vitaly Bordug <vbordug-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>,
Li Yang <leoli-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Thomas Petazzoni
<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Aida Mynzhasova
<aida.mynzhasova-Fmhy8gsqeTEvJsYlp49lxw@public.gmane.org>,
Richard Cochran
<richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Claudiu Manoil
<claudiu.manoil-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
"open list:OPEN FIRMWARE AND..."
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"open list:LINUX FOR POWERPC..."
<linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: [PATCH RESEND net-next 5/9] fs_enet: use the new fixed PHY helpers
Date: Thu, 22 May 2014 01:58:12 +0400 [thread overview]
Message-ID: <537D2174.8040405@cogentembedded.com> (raw)
In-Reply-To: <1400708331-18088-6-git-send-email-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 05/22/2014 01:38 AM, Florian Fainelli wrote:
> of_phy_connect_fixed_link() is becoming obsolete, and also required
> platform code to register the fixed PHYs at the specified addresses for
> those to be usable. Get rid of it and use the new of_phy_is_fixed_link()
> plus of_phy_register_fixed_link() helpers to transition over the new
> scheme.
> Signed-off-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
> diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> index dc80db41d6b3..d602711e00e9 100644
> --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
[...]
> @@ -1029,9 +1025,15 @@ static int fs_enet_probe(struct platform_device *ofdev)
> fpi->use_napi = 1;
> fpi->napi_weight = 17;
> fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
> - if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link",
> - NULL)))
> - goto out_free_fpi;
> + if (!fpi->phy_node) {
> + if (of_phy_is_fixed_link(ofdev->dev.of_node)) {
These two *if* statements could be collapsed, reducing the indentation
level below.
> + err = of_phy_register_fixed_link(ofdev->dev.of_node);
> + if (err)
> + goto out_free_fpi;
> +
> + fpi->phy_node = ofdev->dev.of_node;
> + }
> + }
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net,
Pantelis Antoniou <pantelis.antoniou@gmail.com>,
Vitaly Bordug <vbordug@ru.mvista.com>,
Li Yang <leoli@freescale.com>,
Grant Likely <grant.likely@linaro.org>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Aida Mynzhasova <aida.mynzhasova@skitlab.ru>,
Richard Cochran <richardcochran@gmail.com>,
Claudiu Manoil <claudiu.manoil@freescale.com>,
"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:LINUX FOR POWERPC..." <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH RESEND net-next 5/9] fs_enet: use the new fixed PHY helpers
Date: Thu, 22 May 2014 01:58:12 +0400 [thread overview]
Message-ID: <537D2174.8040405@cogentembedded.com> (raw)
In-Reply-To: <1400708331-18088-6-git-send-email-f.fainelli@gmail.com>
On 05/22/2014 01:38 AM, Florian Fainelli wrote:
> of_phy_connect_fixed_link() is becoming obsolete, and also required
> platform code to register the fixed PHYs at the specified addresses for
> those to be usable. Get rid of it and use the new of_phy_is_fixed_link()
> plus of_phy_register_fixed_link() helpers to transition over the new
> scheme.
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
> diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> index dc80db41d6b3..d602711e00e9 100644
> --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
[...]
> @@ -1029,9 +1025,15 @@ static int fs_enet_probe(struct platform_device *ofdev)
> fpi->use_napi = 1;
> fpi->napi_weight = 17;
> fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
> - if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link",
> - NULL)))
> - goto out_free_fpi;
> + if (!fpi->phy_node) {
> + if (of_phy_is_fixed_link(ofdev->dev.of_node)) {
These two *if* statements could be collapsed, reducing the indentation
level below.
> + err = of_phy_register_fixed_link(ofdev->dev.of_node);
> + if (err)
> + goto out_free_fpi;
> +
> + fpi->phy_node = ofdev->dev.of_node;
> + }
> + }
WBR, Sergei
next prev parent reply other threads:[~2014-05-21 21:58 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 21:38 [PATCH RESEND 0/9 net-next] net: of_phy_connect_fixed_link removal Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` [PATCH RESEND net-next 1/9] Documentation: devicetree: add old and deprecated 'fixed-link' Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:48 ` Sergei Shtylyov
2014-05-21 21:48 ` Sergei Shtylyov
2014-05-21 21:48 ` Sergei Shtylyov
2014-05-21 21:38 ` [PATCH RESEND net-next 2/9] Documentation: devicetree: net: refer to fixed-link.txt Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` [PATCH RESEND net-next 3/9] net: bcmgenet: use the new fixed PHY helpers Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` [PATCH RESEND net-next 4/9] net: systemport: " Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:55 ` Sergei Shtylyov
2014-05-21 21:55 ` Sergei Shtylyov
2014-05-21 22:02 ` Florian Fainelli
2014-05-21 22:02 ` Florian Fainelli
2014-05-21 22:02 ` Florian Fainelli
2014-05-22 17:21 ` Sergei Shtylyov
2014-05-22 17:21 ` Sergei Shtylyov
2014-05-22 17:21 ` Sergei Shtylyov
2014-05-21 21:38 ` [PATCH RESEND net-next 5/9] fs_enet: " Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:58 ` Sergei Shtylyov [this message]
2014-05-21 21:58 ` Sergei Shtylyov
2014-05-21 21:58 ` Sergei Shtylyov
2014-05-21 21:38 ` [PATCH RESEND net-next 6/9] gianfar: " Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` [PATCH RESEND net-next 7/9] ucc_geth: " Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` [PATCH RESEND net-next 8/9] of: mdio: remove of_phy_connect_fixed_link Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` [PATCH RESEND net-next 9/9] powerpc/fsl: fsl_soc: remove 'fixed-link' parsing code Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-21 21:38 ` Florian Fainelli
2014-05-22 15:53 ` [PATCH RESEND 0/9 net-next] net: of_phy_connect_fixed_link removal David Miller
2014-05-22 15:53 ` David Miller
2014-05-22 15:53 ` David Miller
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=537D2174.8040405@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=aida.mynzhasova@skitlab.ru \
--cc=claudiu.manoil@freescale.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=grant.likely@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=vbordug@ru.mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.