* [PATCH] net: phy: marvell: logical vs bitwise OR typo
@ 2017-08-04 8:17 Dan Carpenter
2017-08-04 14:54 ` David Laight
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dan Carpenter @ 2017-08-04 8:17 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Florian Fainelli, netdev, kernel-janitors
This was supposed to be a bitwise OR but there is a || vs | typo.
Fixes: 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay configuration")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 361fe9927ef2..15cbcdba618a 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -83,7 +83,7 @@
#define MII_88E1121_PHY_MSCR_REG 21
#define MII_88E1121_PHY_MSCR_RX_DELAY BIT(5)
#define MII_88E1121_PHY_MSCR_TX_DELAY BIT(4)
-#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(BIT(5) || BIT(4)))
+#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(BIT(5) | BIT(4)))
#define MII_88E1121_MISC_TEST 0x1a
#define MII_88E1510_MISC_TEST_TEMP_THRESHOLD_MASK 0x1f00
^ permalink raw reply related [flat|nested] 5+ messages in thread* RE: [PATCH] net: phy: marvell: logical vs bitwise OR typo
2017-08-04 8:17 [PATCH] net: phy: marvell: logical vs bitwise OR typo Dan Carpenter
@ 2017-08-04 14:54 ` David Laight
2017-08-04 17:48 ` Andrew Lunn
2017-08-04 17:46 ` Andrew Lunn
2017-08-04 17:57 ` David Miller
2 siblings, 1 reply; 5+ messages in thread
From: David Laight @ 2017-08-04 14:54 UTC (permalink / raw)
To: 'Dan Carpenter', Andrew Lunn
Cc: Florian Fainelli, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
From: Dan Carpenter
> Sent: 04 August 2017 09:17
> This was supposed to be a bitwise OR but there is a || vs | typo.
>
> Fixes: 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay configuration")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index 361fe9927ef2..15cbcdba618a 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -83,7 +83,7 @@
> #define MII_88E1121_PHY_MSCR_REG 21
> #define MII_88E1121_PHY_MSCR_RX_DELAY BIT(5)
> #define MII_88E1121_PHY_MSCR_TX_DELAY BIT(4)
> -#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(BIT(5) || BIT(4)))
> +#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(BIT(5) | BIT(4)))
Wouldn't:
+#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(MII_88E1121_PHY_MSCR_RX_DELAY | MII_88E1121_PHY_MSCR_TX_DELAY))
be more correct?
If a little long?
Actually the ~ looks odd here....
Reads code....
Kill the define and explicitly mask off the two values just before
conditionally setting them.
David
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] net: phy: marvell: logical vs bitwise OR typo
2017-08-04 14:54 ` David Laight
@ 2017-08-04 17:48 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2017-08-04 17:48 UTC (permalink / raw)
To: David Laight
Cc: 'Dan Carpenter', Florian Fainelli, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
On Fri, Aug 04, 2017 at 02:54:45PM +0000, David Laight wrote:
> From: Dan Carpenter
> > Sent: 04 August 2017 09:17
> > This was supposed to be a bitwise OR but there is a || vs | typo.
> >
> > Fixes: 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay configuration")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> > index 361fe9927ef2..15cbcdba618a 100644
> > --- a/drivers/net/phy/marvell.c
> > +++ b/drivers/net/phy/marvell.c
> > @@ -83,7 +83,7 @@
> > #define MII_88E1121_PHY_MSCR_REG 21
> > #define MII_88E1121_PHY_MSCR_RX_DELAY BIT(5)
> > #define MII_88E1121_PHY_MSCR_TX_DELAY BIT(4)
> > -#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(BIT(5) || BIT(4)))
> > +#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(BIT(5) | BIT(4)))
>
> Wouldn't:
> +#define MII_88E1121_PHY_MSCR_DELAY_MASK (~(MII_88E1121_PHY_MSCR_RX_DELAY | MII_88E1121_PHY_MSCR_TX_DELAY))
> be more correct?
> If a little long?
> Actually the ~ looks odd here....
> Reads code....
> Kill the define and explicitly mask off the two values just before
> conditionally setting them.
Hi David
I will put this on my TODO list. But lets get Dan's fix included
first.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: phy: marvell: logical vs bitwise OR typo
2017-08-04 8:17 [PATCH] net: phy: marvell: logical vs bitwise OR typo Dan Carpenter
2017-08-04 14:54 ` David Laight
@ 2017-08-04 17:46 ` Andrew Lunn
2017-08-04 17:57 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2017-08-04 17:46 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Florian Fainelli, netdev, kernel-janitors
On Fri, Aug 04, 2017 at 11:17:21AM +0300, Dan Carpenter wrote:
> This was supposed to be a bitwise OR but there is a || vs | typo.
>
> Fixes: 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay configuration")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Hi Dan
Thanks for the fix.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] net: phy: marvell: logical vs bitwise OR typo
2017-08-04 8:17 [PATCH] net: phy: marvell: logical vs bitwise OR typo Dan Carpenter
2017-08-04 14:54 ` David Laight
2017-08-04 17:46 ` Andrew Lunn
@ 2017-08-04 17:57 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-08-04 17:57 UTC (permalink / raw)
To: dan.carpenter; +Cc: andrew, f.fainelli, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 4 Aug 2017 11:17:21 +0300
> This was supposed to be a bitwise OR but there is a || vs | typo.
>
> Fixes: 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay configuration")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, but please specify "[PATCH net-next]" in your Subject line
and make your target tree explicit in the future.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-04 17:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 8:17 [PATCH] net: phy: marvell: logical vs bitwise OR typo Dan Carpenter
2017-08-04 14:54 ` David Laight
2017-08-04 17:48 ` Andrew Lunn
2017-08-04 17:46 ` Andrew Lunn
2017-08-04 17:57 ` David Miller
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).