netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] micrel: fix masking off LED bits
  2014-03-18 23:58 [PATCH] micrel: fix masking off LED bits Sergei Shtylyov
@ 2014-03-18 23:27 ` Laurent Pinchart
  2014-03-19  8:12 ` Ben Dooks
  2014-03-19 21:42 ` David Miller
  2 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2014-03-18 23:27 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: netdev, linux-sh, ben.dooks

Hi Sergei,

Thank you for the patch.

On Wednesday 19 March 2014 02:58:16 Sergei Shtylyov wrote:
> Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made
> the obvious mistake when masking off  the LED mode bits: forgot to do a
> logical NOT to the mask with which it ANDs the register value, so that
> unrelated bits are cleared instead.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Good catch.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> This patch is against DaveM's 'net-next.git' repo.
> 
>  drivers/net/phy/micrel.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: net-next/drivers/net/phy/micrel.c
> ===================================================================
> --- net-next.orig/drivers/net/phy/micrel.c
> +++ net-next/drivers/net/phy/micrel.c
> @@ -167,7 +167,7 @@ static int kszphy_setup_led(struct phy_d
>  	if (temp < 0)
>  		return temp;
> 
> -	temp &= 3 << shift;
> +	temp &= ~(3 << shift);
>  	temp |= val << shift;
>  	rc = phy_write(phydev, reg, temp);


-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] micrel: fix masking off LED bits
@ 2014-03-18 23:58 Sergei Shtylyov
  2014-03-18 23:27 ` Laurent Pinchart
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2014-03-18 23:58 UTC (permalink / raw)
  To: netdev; +Cc: linux-sh, ben.dooks

Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
obvious mistake when masking off  the LED mode bits: forgot to do a logical NOT
to the mask with which it ANDs the register value, so that unrelated bits are
cleared instead.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against DaveM's 'net-next.git' repo.

 drivers/net/phy/micrel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: net-next/drivers/net/phy/micrel.c
===================================================================
--- net-next.orig/drivers/net/phy/micrel.c
+++ net-next/drivers/net/phy/micrel.c
@@ -167,7 +167,7 @@ static int kszphy_setup_led(struct phy_d
 	if (temp < 0)
 		return temp;
 
-	temp &= 3 << shift;
+	temp &= ~(3 << shift);
 	temp |= val << shift;
 	rc = phy_write(phydev, reg, temp);
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] micrel: fix masking off LED bits
  2014-03-18 23:58 [PATCH] micrel: fix masking off LED bits Sergei Shtylyov
  2014-03-18 23:27 ` Laurent Pinchart
@ 2014-03-19  8:12 ` Ben Dooks
  2014-03-19 16:21   ` Florian Fainelli
  2014-03-19 21:42 ` David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Ben Dooks @ 2014-03-19  8:12 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: netdev, linux-sh

On 19/03/14 00:58, Sergei Shtylyov wrote:
> Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
> obvious mistake when masking off  the LED mode bits: forgot to do a logical NOT
> to the mask with which it ANDs the register value, so that unrelated bits are
> cleared instead.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Ben Dooks <ben.dooks@codethink.co.uk>

Oops, thanks for noticing that.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] micrel: fix masking off LED bits
  2014-03-19  8:12 ` Ben Dooks
@ 2014-03-19 16:21   ` Florian Fainelli
  2014-03-19 19:35     ` Sergei Shtylyov
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Fainelli @ 2014-03-19 16:21 UTC (permalink / raw)
  To: Ben Dooks; +Cc: Sergei Shtylyov, netdev, Linux-sh list

2014-03-19 1:12 GMT-07:00 Ben Dooks <ben.dooks@codethink.co.uk>:
> On 19/03/14 00:58, Sergei Shtylyov wrote:
>>
>> Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made
>> the
>> obvious mistake when masking off  the LED mode bits: forgot to do a
>> logical NOT
>> to the mask with which it ANDs the register value, so that unrelated bits
>> are
>> cleared instead.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> Acked-by: Ben Dooks <ben.dooks@codethink.co.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] micrel: fix masking off LED bits
  2014-03-19 16:21   ` Florian Fainelli
@ 2014-03-19 19:35     ` Sergei Shtylyov
  0 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2014-03-19 19:35 UTC (permalink / raw)
  To: Florian Fainelli, Ben Dooks; +Cc: netdev, Linux-sh list

Hello.

On 03/19/2014 07:21 PM, Florian Fainelli wrote:

>>> Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made
>>> the
>>> obvious mistake when masking off  the LED mode bits: forgot to do a
>>> logical NOT
>>> to the mask with which it ANDs the register value, so that unrelated bits
>>> are
>>> cleared instead.

>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

>> Acked-by: Ben Dooks <ben.dooks@codethink.co.uk>

> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

    Oh, sorry for not CCing you -- I forgot that phylib is now maintained.

WBR, Sergei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] micrel: fix masking off LED bits
  2014-03-18 23:58 [PATCH] micrel: fix masking off LED bits Sergei Shtylyov
  2014-03-18 23:27 ` Laurent Pinchart
  2014-03-19  8:12 ` Ben Dooks
@ 2014-03-19 21:42 ` David Miller
  2014-03-20 18:44   ` Sergei Shtylyov
  2 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2014-03-19 21:42 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, linux-sh, ben.dooks

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 19 Mar 2014 02:58:16 +0300

> Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
> obvious mistake when masking off  the LED mode bits: forgot to do a logical NOT
> to the mask with which it ANDs the register value, so that unrelated bits are
> cleared instead.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Applied to net-next, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] micrel: fix masking off LED bits
  2014-03-19 21:42 ` David Miller
@ 2014-03-20 18:44   ` Sergei Shtylyov
  0 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2014-03-20 18:44 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-sh, ben.dooks

Hello.

On 03/20/2014 12:42 AM, David Miller wrote:

>> Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
>> obvious mistake when masking off  the LED mode bits: forgot to do a logical NOT
>> to the mask with which it ANDs the register value, so that unrelated bits are
>> cleared instead.

    I'm seeing now that I hadn't finished editing the changelog before 
submitting -- the verbs have inconsistent times. So much for my haste... :-)

>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

> Applied to net-next, thanks.

    Thanks.

WBR, Sergei

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-20 17:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 23:58 [PATCH] micrel: fix masking off LED bits Sergei Shtylyov
2014-03-18 23:27 ` Laurent Pinchart
2014-03-19  8:12 ` Ben Dooks
2014-03-19 16:21   ` Florian Fainelli
2014-03-19 19:35     ` Sergei Shtylyov
2014-03-19 21:42 ` David Miller
2014-03-20 18:44   ` Sergei Shtylyov

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).