From: Florian Fainelli <f.fainelli@gmail.com>
To: Iyappan Subramanian <isubramanian@apm.com>,
davem@davemloft.net, netdev@vger.kernel.org
Cc: andrew@lunn.ch, patches@apm.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 net-next 1/2] include: linux: Add helper function to check phy interface mode
Date: Thu, 18 May 2017 15:19:58 -0700 [thread overview]
Message-ID: <0c55a097-564d-58ea-8e64-d642a1d8fad7@gmail.com> (raw)
In-Reply-To: <1495145624-29463-2-git-send-email-isubramanian@apm.com>
On 05/18/2017 03:13 PM, Iyappan Subramanian wrote:
> Added helper function that checks phy_mode is RGMII (all variants)
> 'bool phy_interface_mode_is_rgmii(phy_interface_t mode)'
>
> Changed the following function, to use the above.
> 'bool phy_interface_is_rgmii(struct phy_device *phydev)'
>
> Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
> Suggested-by: Florian Fainelli <f.fainelli@gmail.com>
> Suggested-by: Andrew Lunn <andrew@lunn.ch>
Not sure why you have chosen include: linux as the subject since all
changes done to that file typically had the "phy: " prefix, but the code
changes are fine, thanks!
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> include/linux/phy.h | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 54ef458..5a808a2 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -716,14 +716,24 @@ static inline bool phy_is_internal(struct phy_device *phydev)
> }
>
> /**
> + * phy_interface_mode_is_rgmii - Convenience function for testing if a
> + * PHY interface mode is RGMII (all variants)
> + * @mode: the phy_interface_t enum
> + */
> +static inline bool phy_interface_mode_is_rgmii(phy_interface_t mode)
> +{
> + return mode >= PHY_INTERFACE_MODE_RGMII &&
> + mode <= PHY_INTERFACE_MODE_RGMII_TXID;
> +};
> +
> +/**
> * phy_interface_is_rgmii - Convenience function for testing if a PHY interface
> * is RGMII (all variants)
> * @phydev: the phy_device struct
> */
> static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
> {
> - return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
> - phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
> + return phy_interface_mode_is_rgmii(phydev->interface);
> };
>
> /*
>
--
Florian
next prev parent reply other threads:[~2017-05-18 22:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 22:13 [PATCH v2 net-next 0/2] Check all RGMII phy mode variants Iyappan Subramanian
2017-05-18 22:13 ` [PATCH v2 net-next 1/2] include: linux: Add helper function to check phy interface mode Iyappan Subramanian
2017-05-18 22:19 ` Florian Fainelli [this message]
2017-05-19 4:34 ` Iyappan Subramanian
2017-05-18 22:13 ` [PATCH v2 net-next 2/2] drivers: net: xgene: Check all RGMII phy mode variants Iyappan Subramanian
2017-05-19 23:42 ` [PATCH v2 net-next 0/2] " 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=0c55a097-564d-58ea-8e64-d642a1d8fad7@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=isubramanian@apm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=patches@apm.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