diff mbox

ARM: autcpu12: Fix config check in autcpu12_init_late()

Message ID 1363988123.3728.45.camel@deadeye.wl.decadent.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Hutchings March 22, 2013, 9:35 p.m. UTC
The 'CONFIG_' prefix is not implicit in IS_ENABLED().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Olof Johansson <olof@lixom.net>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: <stable@vger.kernel.org> # 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(-)

Comments

Alexander Shiyan March 23, 2013, 5:22 a.m. UTC | #1
> The 'CONFIG_' prefix is not implicit in IS_ENABLED().
> 
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> Cc: Alexander Shiyan <shc_work@mail.ru>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Paul Bolle <pebolle@tiscali.nl>
> Cc: <stable@vger.kernel.org> # 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(-)
> 
> diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c
> index f385847..8138523 100644
> --- a/arch/arm/mach-clps711x/board-autcpu12.c
> +++ b/arch/arm/mach-clps711x/board-autcpu12.c
> @@ -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.

---
Olof Johansson April 2, 2013, 5:12 p.m. UTC | #2
On Sat, Mar 23, 2013 at 09:22:20AM +0400, Alexander Shiyan wrote:
> > The 'CONFIG_' prefix is not implicit in IS_ENABLED().
> > 
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > Cc: Alexander Shiyan <shc_work@mail.ru>
> > Cc: Olof Johansson <olof@lixom.net>
> > Cc: Paul Bolle <pebolle@tiscali.nl>
> > Cc: <stable@vger.kernel.org> # 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(-)
> > 
> > diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c
> > index f385847..8138523 100644
> > --- a/arch/arm/mach-clps711x/board-autcpu12.c
> > +++ b/arch/arm/mach-clps711x/board-autcpu12.c
> > @@ -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.

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
Ben Hutchings April 3, 2013, 2:53 a.m. UTC | #3
On Tue, 2013-04-02 at 10:12 -0700, Olof Johansson wrote:
> On Sat, Mar 23, 2013 at 09:22:20AM +0400, Alexander Shiyan wrote:
> > > The 'CONFIG_' prefix is not implicit in IS_ENABLED().
> > > 
> > > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > > Cc: Alexander Shiyan <shc_work@mail.ru>
> > > Cc: Olof Johansson <olof@lixom.net>
> > > Cc: Paul Bolle <pebolle@tiscali.nl>
> > > Cc: <stable@vger.kernel.org> # 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(-)
> > > 
> > > diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c
> > > index f385847..8138523 100644
> > > --- a/arch/arm/mach-clps711x/board-autcpu12.c
> > > +++ b/arch/arm/mach-clps711x/board-autcpu12.c
> > > @@ -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.
> 
> 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.
Alexander Shiyan April 3, 2013, 6:57 a.m. UTC | #4
Hello.

> On Sat, Mar 23, 2013 at 09:22:20AM +0400, Alexander Shiyan wrote:
> > > The 'CONFIG_' prefix is not implicit in IS_ENABLED().
> > > 
> > > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > > Cc: Alexander Shiyan <shc_work@mail.ru>
> > > Cc: Olof Johansson <olof@lixom.net>
> > > Cc: Paul Bolle <pebolle@tiscali.nl>
> > > Cc: <stable@vger.kernel.org> # 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(-)
> > > 
> > > diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c
> > > index f385847..8138523 100644
> > > --- a/arch/arm/mach-clps711x/board-autcpu12.c
> > > +++ b/arch/arm/mach-clps711x/board-autcpu12.c
> > > @@ -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.
> 
> 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.

---
diff mbox

Patch

diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c
index f385847..8138523 100644
--- a/arch/arm/mach-clps711x/board-autcpu12.c
+++ b/arch/arm/mach-clps711x/board-autcpu12.c
@@ -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);
 	}