diff mbox

[U-Boot] arm: imx: Fix conflicting definition types of 'get_reset_cause'

Message ID 1425319858-6748-1-git-send-email-otavio@ossystems.com.br
State Rejected
Delegated to: Stefano Babic
Headers show

Commit Message

Otavio Salvador March 2, 2015, 6:10 p.m. UTC
The common i.MX definition of 'get_reset_cause' function is non-static
so the overriden ones should follow it. This fixes following error:

,----
|  arch/arm/imx-common/cpu.c:29:14: error: static declaration
|   of 'get_reset_cause' follows non-static declaration
|   static char *get_reset_cause(void)
`----

The fix has been done in all i.MX based SoCs plus vf610.

Fixes [YOCTO: #7384].

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 arch/arm/cpu/arm1136/mx31/generic.c   | 2 +-
 arch/arm/cpu/arm1136/mx35/generic.c   | 2 +-
 arch/arm/cpu/arm926ejs/mx25/generic.c | 2 +-
 arch/arm/cpu/armv7/vf610/generic.c    | 2 +-
 arch/arm/imx-common/cpu.c             | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

Comments

Marek Vasut March 2, 2015, 6:27 p.m. UTC | #1
On Monday, March 02, 2015 at 07:10:58 PM, Otavio Salvador wrote:
> The common i.MX definition of 'get_reset_cause' function is non-static
> so the overriden ones should follow it. This fixes following error:
> 
> ,----
> 
> |  arch/arm/imx-common/cpu.c:29:14: error: static declaration
> |  
> |   of 'get_reset_cause' follows non-static declaration
> |   static char *get_reset_cause(void)
> 
> `----
> 
> The fix has been done in all i.MX based SoCs plus vf610.
> 
> Fixes [YOCTO: #7384].
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

You should instead drop the prototype from sys_proto.h and repair
the only one non-static occurance in arch/arm/imx-common/cpu.c .

Best regards,
Marek Vasut
Stefano Babic March 2, 2015, 6:32 p.m. UTC | #2
Hi Marek, Otavio,

On 02/03/2015 19:27, Marek Vasut wrote:
> On Monday, March 02, 2015 at 07:10:58 PM, Otavio Salvador wrote:
>> The common i.MX definition of 'get_reset_cause' function is non-static
>> so the overriden ones should follow it. This fixes following error:
>>
>> ,----
>>
>> |  arch/arm/imx-common/cpu.c:29:14: error: static declaration
>> |  
>> |   of 'get_reset_cause' follows non-static declaration
>> |   static char *get_reset_cause(void)
>>
>> `----
>>
>> The fix has been done in all i.MX based SoCs plus vf610.
>>
>> Fixes [YOCTO: #7384].
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> 
> You should instead drop the prototype from sys_proto.h and repair
> the only one non-static occurance in arch/arm/imx-common/cpu.c .
> 

This is the fix I sent this morning:

http://patchwork.ozlabs.org/patch/445002/

Best regards,
Stefano Babic
Otavio Salvador March 2, 2015, 6:35 p.m. UTC | #3
On Mon, Mar 2, 2015 at 3:32 PM, Stefano Babic <sbabic@denx.de> wrote:
> Hi Marek, Otavio,
>
> On 02/03/2015 19:27, Marek Vasut wrote:
>> On Monday, March 02, 2015 at 07:10:58 PM, Otavio Salvador wrote:
>>> The common i.MX definition of 'get_reset_cause' function is non-static
>>> so the overriden ones should follow it. This fixes following error:
>>>
>>> ,----
>>>
>>> |  arch/arm/imx-common/cpu.c:29:14: error: static declaration
>>> |
>>> |   of 'get_reset_cause' follows non-static declaration
>>> |   static char *get_reset_cause(void)
>>>
>>> `----
>>>
>>> The fix has been done in all i.MX based SoCs plus vf610.
>>>
>>> Fixes [YOCTO: #7384].
>>>
>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>
>> You should instead drop the prototype from sys_proto.h and repair
>> the only one non-static occurance in arch/arm/imx-common/cpu.c .
>>
>
> This is the fix I sent this morning:
>
> http://patchwork.ozlabs.org/patch/445002/

Sorry; I missed this one. This fixes the issue. :-D

Thanks!
diff mbox

Patch

diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
index 060d46b..df8ebfc 100644
--- a/arch/arm/cpu/arm1136/mx31/generic.c
+++ b/arch/arm/cpu/arm1136/mx31/generic.c
@@ -180,7 +180,7 @@  u32 get_cpu_rev(void)
 	return srev | 0x8000;
 }
 
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	/* read RCSR register from CCM module */
 	struct clock_control_regs *ccm =
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index bc98edd..6dd8116 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -396,7 +396,7 @@  U_BOOT_CMD(
 );
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	/* read RCSR register from CCM module */
 	struct ccm_regs *ccm =
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 8912098..9f37f4d 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -149,7 +149,7 @@  u32 get_cpu_rev(void)
 }
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	/* read RCSR register from CCM module */
 	struct ccm_regs *ccm =
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 92aaad9..aea0c0d 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -258,7 +258,7 @@  void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 #endif
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	u32 cause;
 	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index 067d08f..b985f18 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -26,7 +26,7 @@ 
 
 static u32 reset_cause = -1;
 
-static char *get_reset_cause(void)
+char *get_reset_cause(void)
 {
 	u32 cause;
 	struct src *src_regs = (struct src *)SRC_BASE_ADDR;