* [PATCH] net: stmmac: fixed operator typo
@ 2013-06-28 7:35 Byungho An
2013-06-28 12:59 ` Giuseppe CAVALLARO
0 siblings, 1 reply; 3+ messages in thread
From: Byungho An @ 2013-06-28 7:35 UTC (permalink / raw)
To: netdev
Cc: 'Giuseppe CAVALLARO', '김국진',
davem, cpgs
This patch fixed operator typo from & to ==.
Due to incorrect operator, the result is incorrect.
Signed-off-by: Byungho An <bh74.an@samsung.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 +++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index c1ad5f4..f088633 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -788,13 +788,13 @@ static void stmmac_check_pcs_mode(struct stmmac_priv *priv)
int interface = priv->plat->interface;
if (priv->dma_cap.pcs) {
- if ((interface & PHY_INTERFACE_MODE_RGMII) ||
- (interface & PHY_INTERFACE_MODE_RGMII_ID) ||
- (interface & PHY_INTERFACE_MODE_RGMII_RXID) ||
- (interface & PHY_INTERFACE_MODE_RGMII_TXID)) {
+ if ((interface == PHY_INTERFACE_MODE_RGMII) ||
+ (interface == PHY_INTERFACE_MODE_RGMII_ID) ||
+ (interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
+ (interface == PHY_INTERFACE_MODE_RGMII_TXID)) {
pr_debug("STMMAC: PCS RGMII support enable\n");
priv->pcs = STMMAC_PCS_RGMII;
- } else if (interface & PHY_INTERFACE_MODE_SGMII) {
+ } else if (interface == PHY_INTERFACE_MODE_SGMII) {
pr_debug("STMMAC: PCS SGMII support enable\n");
priv->pcs = STMMAC_PCS_SGMII;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: stmmac: fixed operator typo
2013-06-28 7:35 [PATCH] net: stmmac: fixed operator typo Byungho An
@ 2013-06-28 12:59 ` Giuseppe CAVALLARO
2013-07-01 20:33 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe CAVALLARO @ 2013-06-28 12:59 UTC (permalink / raw)
To: Byungho An; +Cc: netdev, '김국진', davem, cpgs
On 6/28/2013 9:35 AM, Byungho An wrote:
>
> This patch fixed operator typo from & to ==.
> Due to incorrect operator, the result is incorrect.
>
> Signed-off-by: Byungho An <bh74.an@samsung.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 +++++++++++++--------
> 1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index c1ad5f4..f088633 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -788,13 +788,13 @@ static void stmmac_check_pcs_mode(struct stmmac_priv *priv)
> int interface = priv->plat->interface;
>
> if (priv->dma_cap.pcs) {
> - if ((interface & PHY_INTERFACE_MODE_RGMII) ||
> - (interface & PHY_INTERFACE_MODE_RGMII_ID) ||
> - (interface & PHY_INTERFACE_MODE_RGMII_RXID) ||
> - (interface & PHY_INTERFACE_MODE_RGMII_TXID)) {
> + if ((interface == PHY_INTERFACE_MODE_RGMII) ||
> + (interface == PHY_INTERFACE_MODE_RGMII_ID) ||
> + (interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
> + (interface == PHY_INTERFACE_MODE_RGMII_TXID)) {
> pr_debug("STMMAC: PCS RGMII support enable\n");
> priv->pcs = STMMAC_PCS_RGMII;
> - } else if (interface & PHY_INTERFACE_MODE_SGMII) {
> + } else if (interface == PHY_INTERFACE_MODE_SGMII) {
> pr_debug("STMMAC: PCS SGMII support enable\n");
> priv->pcs = STMMAC_PCS_SGMII;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: stmmac: fixed operator typo
2013-06-28 12:59 ` Giuseppe CAVALLARO
@ 2013-07-01 20:33 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2013-07-01 20:33 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: bh74.an, netdev, kgene.kim, cpgs
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Fri, 28 Jun 2013 14:59:36 +0200
> On 6/28/2013 9:35 AM, Byungho An wrote:
>>
>> This patch fixed operator typo from & to ==.
>> Due to incorrect operator, the result is incorrect.
>>
>> Signed-off-by: Byungho An <bh74.an@samsung.com>
>
> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-01 20:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-28 7:35 [PATCH] net: stmmac: fixed operator typo Byungho An
2013-06-28 12:59 ` Giuseppe CAVALLARO
2013-07-01 20:33 ` David Miller
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.