public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
@ 2013-01-23 13:50 Gerlando Falauto
  2013-01-23 14:08 ` Andrew Lunn
  2013-01-23 14:25 ` Jason Cooper
  0 siblings, 2 replies; 5+ messages in thread
From: Gerlando Falauto @ 2013-01-23 13:50 UTC (permalink / raw)
  To: linux-arm-kernel

Commit 3cff484d4b264ff467a3b45c544cbbbab69f0bf8
ARM: dove: Consolidate mpp code with platform mpp.

refactored printing of the kernel warning
"orion_mpp_conf: requested MPP%u config unavailable on this hardware\n"
which is not to be printed in case of variant_mask = 0 (unknown variant).
This check should be performed using a logical AND (&&) as opposed
to a bitwise AND (&).
Otherwise, test would fail (and message would be printed) if variant_mask != 1

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Olof Johansson <olof@lixom.net>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Holger Brunck <holger.brunck@keymile.com>
---
 arch/arm/plat-orion/mpp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c
index 3b1e17b..78ea76c 100644
--- a/arch/arm/plat-orion/mpp.c
+++ b/arch/arm/plat-orion/mpp.c
@@ -48,7 +48,7 @@ void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask,
 					"number (%u)\n", num);
 			continue;
 		}
-		if (variant_mask & !(*mpp_list & variant_mask)) {
+		if (variant_mask && !(*mpp_list & variant_mask)) {
 			printk(KERN_WARNING
 			       "orion_mpp_conf: requested MPP%u config "
 			       "unavailable on this hardware\n", num);
-- 
1.7.10.1

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

* [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
  2013-01-23 13:50 [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware" Gerlando Falauto
@ 2013-01-23 14:08 ` Andrew Lunn
  2013-01-23 14:25 ` Jason Cooper
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2013-01-23 14:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 02:50:59PM +0100, Gerlando Falauto wrote:
> Commit 3cff484d4b264ff467a3b45c544cbbbab69f0bf8
> ARM: dove: Consolidate mpp code with platform mpp.
> 
> refactored printing of the kernel warning
> "orion_mpp_conf: requested MPP%u config unavailable on this hardware\n"
> which is not to be printed in case of variant_mask = 0 (unknown variant).
> This check should be performed using a logical AND (&&) as opposed
> to a bitwise AND (&).
> Otherwise, test would fail (and message would be printed) if variant_mask != 1
> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Nicolas Pitre <nico@linaro.org>
> Cc: Holger Brunck <holger.brunck@keymile.com>
> ---
>  arch/arm/plat-orion/mpp.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/plat-orion/mpp.c b/arch/arm/plat-orion/mpp.c
> index 3b1e17b..78ea76c 100644
> --- a/arch/arm/plat-orion/mpp.c
> +++ b/arch/arm/plat-orion/mpp.c
> @@ -48,7 +48,7 @@ void __init orion_mpp_conf(unsigned int *mpp_list, unsigned int variant_mask,
>  					"number (%u)\n", num);
>  			continue;
>  		}
> -		if (variant_mask & !(*mpp_list & variant_mask)) {
> +		if (variant_mask && !(*mpp_list & variant_mask)) {
>  			printk(KERN_WARNING
>  			       "orion_mpp_conf: requested MPP%u config "
>  			       "unavailable on this hardware\n", num);
> -- 
> 1.7.10.1
> 

Acked-by: Andrew Lunn <andrew@lunn.ch>

Looks like it should only affect dove, but interesting, there are no
users of dove_mpp_conf(), so we can probably throw away
mach-dove/mpp.[ch].

	Andrew

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

* [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
  2013-01-23 13:50 [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware" Gerlando Falauto
  2013-01-23 14:08 ` Andrew Lunn
@ 2013-01-23 14:25 ` Jason Cooper
  2013-01-23 14:32   ` Gerlando Falauto
  1 sibling, 1 reply; 5+ messages in thread
From: Jason Cooper @ 2013-01-23 14:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 02:50:59PM +0100, Gerlando Falauto wrote:
> Commit 3cff484d4b264ff467a3b45c544cbbbab69f0bf8
> ARM: dove: Consolidate mpp code with platform mpp.
> 
> refactored printing of the kernel warning
> "orion_mpp_conf: requested MPP%u config unavailable on this hardware\n"
> which is not to be printed in case of variant_mask = 0 (unknown variant).
> This check should be performed using a logical AND (&&) as opposed
> to a bitwise AND (&).
> Otherwise, test would fail (and message would be printed) if variant_mask != 1
> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Nicolas Pitre <nico@linaro.org>
> Cc: Holger Brunck <holger.brunck@keymile.com>
> ---
>  arch/arm/plat-orion/mpp.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to mvebu/fixes with some minor cleanup of the commit message

thx,

Jason.

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

* [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
  2013-01-23 14:25 ` Jason Cooper
@ 2013-01-23 14:32   ` Gerlando Falauto
  2013-01-23 14:38     ` Jason Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Gerlando Falauto @ 2013-01-23 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/23/2013 03:25 PM, Jason Cooper wrote:
> On Wed, Jan 23, 2013 at 02:50:59PM +0100, Gerlando Falauto wrote:
>> Commit 3cff484d4b264ff467a3b45c544cbbbab69f0bf8
>> ARM: dove: Consolidate mpp code with platform mpp.
>>
>> refactored printing of the kernel warning
>> "orion_mpp_conf: requested MPP%u config unavailable on this hardware\n"
>> which is not to be printed in case of variant_mask = 0 (unknown variant).
>> This check should be performed using a logical AND (&&) as opposed
>> to a bitwise AND (&).
>> Otherwise, test would fail (and message would be printed) if variant_mask != 1

Whooops, what I meant was "and message would NOT be printed"... sorry. :-(
Shouldn't really matter anyway.

Thanks,
Gerlando

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

* [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware"
  2013-01-23 14:32   ` Gerlando Falauto
@ 2013-01-23 14:38     ` Jason Cooper
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Cooper @ 2013-01-23 14:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 23, 2013 at 03:32:41PM +0100, Gerlando Falauto wrote:
> On 01/23/2013 03:25 PM, Jason Cooper wrote:
> >On Wed, Jan 23, 2013 at 02:50:59PM +0100, Gerlando Falauto wrote:
> >>Commit 3cff484d4b264ff467a3b45c544cbbbab69f0bf8
> >>ARM: dove: Consolidate mpp code with platform mpp.
> >>
> >>refactored printing of the kernel warning
> >>"orion_mpp_conf: requested MPP%u config unavailable on this hardware\n"
> >>which is not to be printed in case of variant_mask = 0 (unknown variant).
> >>This check should be performed using a logical AND (&&) as opposed
> >>to a bitwise AND (&).
> >>Otherwise, test would fail (and message would be printed) if variant_mask != 1
> 
> Whooops, what I meant was "and message would NOT be printed"... sorry. :-(
> Shouldn't really matter anyway.

fixed in mvebu/fixes.

thx,

Jason.

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

end of thread, other threads:[~2013-01-23 14:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 13:50 [PATCH] arm: plat-orion: fix printing of "MPP config unavailable on this hardware" Gerlando Falauto
2013-01-23 14:08 ` Andrew Lunn
2013-01-23 14:25 ` Jason Cooper
2013-01-23 14:32   ` Gerlando Falauto
2013-01-23 14:38     ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox