Skip to contentSkip to conversation

ARM: autcpu12: Fix config check in autcpu12_init_late()

PATCH In review Ben Hutchings 3 participants 5 messages Mar 22, 2013 – Apr 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: autcpu12: Fix config check in autcpu12_init_late()

The 'CONFIG_' prefix is not implicit in IS_ENABLED().

Cc Alexander Shiyan <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Paul Bolle <[email protected]>
Cc <[email protected]> # 3.8+

---
Found by inspection. This is not even compile-tested.

Ben.

 arch/arm/mach-clps711x/board-autcpu12.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-clps711x/board-autcpu12.c +2 -1
index f385847..8138523 100644
@@ -158,7 +158,8 @@ static void __init autcpu12_init(void)
 
 static void __init autcpu12_init_late(void)
 {
-	if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) {
+	if (IS_ENABLED(CONFIG_MTD_NAND_GPIO) &&
+	    IS_ENABLED(CONFIG_GPIO_GENERIC_PLATFORM)) {
 		/* We are need both drivers to handle NAND */
 		platform_device_register(&autcpu12_nand_pdev);
 	}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130322/1bd4af3f/attachment.sig>

#1 lore raw
Quoted 20 lines

The 'CONFIG_' prefix is not implicit in IS_ENABLED().

Cc Alexander Shiyan <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Paul Bolle <[email protected]>
Cc <[email protected]> # 3.8+

---
Found by inspection. This is not even compile-tested.

Ben.

 arch/arm/mach-clps711x/board-autcpu12.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-clps711x/board-autcpu12.c +0 -0
index f385847..8138523 100644

arch/arm/mach-clps711x/board-autcpu12.c static void __init autcpu12_init(void) · line 165

Quoted 9 lines
arch/arm/mach-clps711x/board-autcpu12.c +2 -1
@@ -158,7 +158,8 @@ static void __init autcpu12_init(void)
 
 static void __init autcpu12_init_late(void)
 {
-	if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) {
+	if (IS_ENABLED(CONFIG_MTD_NAND_GPIO) &&
+	    IS_ENABLED(CONFIG_GPIO_GENERIC_PLATFORM)) {
 		/* We are need both drivers to handle NAND */
 		platform_device_register(&autcpu12_nand_pdev);
 	}

Oops. Right.
And I think checks can be removed completely.

---

#2 lore raw

PATCH 1/1 ARM: autcpu12: Fix config check in autcpu12_init_late()

Quoted 21 lines · Alexander Shiyan
Quoted 21 lines

The 'CONFIG_' prefix is not implicit in IS_ENABLED().

Cc Alexander Shiyan <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Paul Bolle <[email protected]>
Cc <[email protected]> # 3.8+

---
Found by inspection. This is not even compile-tested.

Ben.

 arch/arm/mach-clps711x/board-autcpu12.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-clps711x/board-autcpu12.c +0 -0
index f385847..8138523 100644
@@ -158,7 +158,8 @@ static void __init autcpu12_init(void)
 
Quoted 11 lines

arch/arm/mach-clps711x/board-autcpu12.c static void __init autcpu12_init(void) · line 165

Quoted 8 lines
arch/arm/mach-clps711x/board-autcpu12.c +2 -1
 static void __init autcpu12_init_late(void)
 {
-	if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) {
+	if (IS_ENABLED(CONFIG_MTD_NAND_GPIO) &&
+	    IS_ENABLED(CONFIG_GPIO_GENERIC_PLATFORM)) {
 		/* We are need both drivers to handle NAND */
 		platform_device_register(&autcpu12_nand_pdev);
 	}

Oops. Right.
And I think checks can be removed completely.

Seems reasonable -- there's no reason to hold off registering the device just because the driver isn't enabled.

Who'll repost a patch to just remove the tests? Ben? Alexander?

-Olof

#3 lore raw

PATCH 1/1 ARM: autcpu12: Fix config check in autcpu12_init_late()

Quoted 34 lines · Olof Johansson
Quoted 21 lines · Alexander Shiyan
Quoted 21 lines

The 'CONFIG_' prefix is not implicit in IS_ENABLED().

Cc Alexander Shiyan <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Paul Bolle <[email protected]>
Cc <[email protected]> # 3.8+

---
Found by inspection. This is not even compile-tested.

Ben.

 arch/arm/mach-clps711x/board-autcpu12.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-clps711x/board-autcpu12.c +0 -0
index f385847..8138523 100644
@@ -158,7 +158,8 @@ static void __init autcpu12_init(void)
 
Quoted 11 lines

arch/arm/mach-clps711x/board-autcpu12.c static void __init autcpu12_init(void) · line 165

Quoted 8 lines
arch/arm/mach-clps711x/board-autcpu12.c +2 -1
 static void __init autcpu12_init_late(void)
 {
-	if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) {
+	if (IS_ENABLED(CONFIG_MTD_NAND_GPIO) &&
+	    IS_ENABLED(CONFIG_GPIO_GENERIC_PLATFORM)) {
 		/* We are need both drivers to handle NAND */
 		platform_device_register(&autcpu12_nand_pdev);
 	}

Oops. Right.
And I think checks can be removed completely.

Quoted 4 lines

Seems reasonable -- there's no reason to hold off registering the device just because the driver isn't enabled.

Who'll repost a patch to just remove the tests? Ben? Alexander?

I won't - I don't know anything about this code other than it's spelt wrong.

Ben.

Signature · 10 lines
Ben Hutchings
Power corrupts.  Absolute power is kind of neat.
                           - John Lehman, Secretary of the US Navy 1981-1987
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130403/4f0c7b9c/attachment.sig>
#4 lore raw
In reply to Olof Johansson

Hello.

Quoted 34 lines · Alexander Shiyan
Quoted 21 lines
Quoted 21 lines

The 'CONFIG_' prefix is not implicit in IS_ENABLED().

Cc Alexander Shiyan <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Paul Bolle <[email protected]>
Cc <[email protected]> # 3.8+

---
Found by inspection. This is not even compile-tested.

Ben.

 arch/arm/mach-clps711x/board-autcpu12.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-clps711x/board-autcpu12.c +0 -0
index f385847..8138523 100644
@@ -158,7 +158,8 @@ static void __init autcpu12_init(void)
 
Quoted 11 lines

arch/arm/mach-clps711x/board-autcpu12.c static void __init autcpu12_init(void) · line 165

Quoted 8 lines
arch/arm/mach-clps711x/board-autcpu12.c +2 -1
 static void __init autcpu12_init_late(void)
 {
-	if (IS_ENABLED(MTD_NAND_GPIO) && IS_ENABLED(GPIO_GENERIC_PLATFORM)) {
+	if (IS_ENABLED(CONFIG_MTD_NAND_GPIO) &&
+	    IS_ENABLED(CONFIG_GPIO_GENERIC_PLATFORM)) {
 		/* We are need both drivers to handle NAND */
 		platform_device_register(&autcpu12_nand_pdev);
 	}

Oops. Right.
And I think checks can be removed completely.

Quoted 4 lines

Seems reasonable -- there's no reason to hold off registering the device just because the driver isn't enabled.

Who'll repost a patch to just remove the tests? Ben? Alexander?

Please apply the patch just yet. I will keep in mind this change. Thanks.

---