Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1367302 > unrolled thread

[PATCH] MIPS: ath79: fix build failure

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2016-03-30 17:40 +0200
Last post2016-03-31 16:10 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] MIPS: ath79: fix build failure Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-03-30 17:40 +0200
    Re: [PATCH] MIPS: ath79: fix build failure Antony Pavlov <antonynpavlov@gmail.com> - 2016-03-30 21:20 +0200
      Re: [PATCH] MIPS: ath79: fix build failure Ralf Baechle <ralf@linux-mips.org> - 2016-03-31 00:00 +0200
        Re: [PATCH] MIPS: ath79: fix build failure Antony Pavlov <antonynpavlov@gmail.com> - 2016-03-31 16:10 +0200

#1367302 — [PATCH] MIPS: ath79: fix build failure

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2016-03-30 17:40 +0200
Subject[PATCH] MIPS: ath79: fix build failure
Message-ID<riqnT-7t2-1@gated-at.bofh.it>
The ath79_defconfig build of mips was faling with the errors:

arch/mips/ath79/setup.c: In function 'plat_mem_setup':
arch/mips/ath79/setup.c:226:20: error: invalid storage class for function 'ath79_of_plat_time_init'
 static void __init ath79_of_plat_time_init(void)
                    ^
arch/mips/ath79/setup.c:226:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
 static void __init ath79_of_plat_time_init(void)
 ^
arch/mips/ath79/setup.c:284:20: error: invalid storage class for function 'ath79_setup'
 static  __init int ath79_setup(void)
                    ^
arch/mips/ath79/setup.c:299:1: error: initializer element is not constant
 arch_initcall(ath79_setup);

It turns out to be a simple error of a missed closing brace.

Fixes: f63ba725caa7 ("MIPS: ath79: Disable platform code for OF boards.")
Cc: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

Build log of next-20160330 is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/119417999

 arch/mips/ath79/setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index 897f49a..e0ff6f3 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -214,6 +214,7 @@ void __init plat_mem_setup(void)
 						 AR71XX_PLL_SIZE);
 		ath79_detect_sys_type();
 		ath79_ddr_ctrl_init();
+	}
 
 	detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
 	/* OF machines should use the reset driver */
-- 
2.1.4

[toc] | [next] | [standalone]


#1367527

FromAntony Pavlov <antonynpavlov@gmail.com>
Date2016-03-30 21:20 +0200
Message-ID<ritON-1xz-1@gated-at.bofh.it>
In reply to#1367302
On Wed, 30 Mar 2016 16:29:49 +0100
Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:

> The ath79_defconfig build of mips was faling with the errors:
> 
> arch/mips/ath79/setup.c: In function 'plat_mem_setup':
> arch/mips/ath79/setup.c:226:20: error: invalid storage class for function 'ath79_of_plat_time_init'
>  static void __init ath79_of_plat_time_init(void)
>                     ^
> arch/mips/ath79/setup.c:226:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
>  static void __init ath79_of_plat_time_init(void)
>  ^
> arch/mips/ath79/setup.c:284:20: error: invalid storage class for function 'ath79_setup'
>  static  __init int ath79_setup(void)
>                     ^
> arch/mips/ath79/setup.c:299:1: error: initializer element is not constant
>  arch_initcall(ath79_setup);
> 
> It turns out to be a simple error of a missed closing brace.
> 
> Fixes: f63ba725caa7 ("MIPS: ath79: Disable platform code for OF boards.")
> Cc: Antony Pavlov <antonynpavlov@gmail.com>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
> 
> Build log of next-20160330 is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/119417999
> 
>  arch/mips/ath79/setup.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
> index 897f49a..e0ff6f3 100644
> --- a/arch/mips/ath79/setup.c
> +++ b/arch/mips/ath79/setup.c
> @@ -214,6 +214,7 @@ void __init plat_mem_setup(void)
>  						 AR71XX_PLL_SIZE);
>  		ath79_detect_sys_type();
>  		ath79_ddr_ctrl_init();
> +	}
>  
>  	detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
>  	/* OF machines should use the reset driver */

It is very strange because my original patch has this closing brace.
Please see my original patch
https://www.linux-mips.org/archives/linux-mips/2016-03/msg00267.html

Also I suppose that we have no need in detect_memory_region() if we use devicetree,
e.g.

                ath79_detect_sys_type();
                ath79_ddr_ctrl_init();
 +              detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
 +      }
  
 -      detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);


-- 
Best regards,
  Antony Pavlov

[toc] | [prev] | [next] | [standalone]


#1367629

FromRalf Baechle <ralf@linux-mips.org>
Date2016-03-31 00:00 +0200
Message-ID<riwjE-358-9@gated-at.bofh.it>
In reply to#1367527
On Wed, Mar 30, 2016 at 10:13:29PM +0300, Antony Pavlov wrote:

> It is very strange because my original patch has this closing brace.
> Please see my original patch
> https://www.linux-mips.org/archives/linux-mips/2016-03/msg00267.html

The patch didn't apply cleanly and I botched resolving it, sorry.  I folded
the fix into the patch.

> Also I suppose that we have no need in detect_memory_region() if we use devicetree,
> e.g.
> 
>                 ath79_detect_sys_type();
>                 ath79_ddr_ctrl_init();
>  +              detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
>  +      }
>   
>  -      detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);

"suppose" is a bit weak..  Should I move the detect_memory_region call?

  Ralf

[toc] | [prev] | [next] | [standalone]


#1368335

FromAntony Pavlov <antonynpavlov@gmail.com>
Date2016-03-31 16:10 +0200
Message-ID<riLsn-6eH-39@gated-at.bofh.it>
In reply to#1367629
On Wed, 30 Mar 2016 23:56:18 +0200
Ralf Baechle <ralf@linux-mips.org> wrote:

> On Wed, Mar 30, 2016 at 10:13:29PM +0300, Antony Pavlov wrote:
> 
> > It is very strange because my original patch has this closing brace.
> > Please see my original patch
> > https://www.linux-mips.org/archives/linux-mips/2016-03/msg00267.html
> 
> The patch didn't apply cleanly and I botched resolving it, sorry.  I folded
> the fix into the patch.
> 
> > Also I suppose that we have no need in detect_memory_region() if we use devicetree,
> > e.g.
> > 
> >                 ath79_detect_sys_type();
> >                 ath79_ddr_ctrl_init();
> >  +              detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
> >  +      }
> >   
> >  -      detect_memory_region(0, ATH79_MEM_SIZE_MIN, ATH79_MEM_SIZE_MAX);
> 
> "suppose" is a bit weak..  Should I move the detect_memory_region call?

I have just examined lastest master from git://git.linux-mips.org/pub/scm/ralf/linux

The problem is a bit more complex. We have to move _machine_restart assignment too.

I'll send fixup in a few seconds.

Also please remove a dot from commit title.

-- 
Best regards,
  Antony Pavlov

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web