Skip to contentSkip to conversation

arm: imx: Fix conflicting definition types of 'get_reset_cause'

PATCH New Otavio Salvador 3 participants 4 messages Mar 2, 2015

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

PATCH 1/1 arm: imx: Fix conflicting definition types of 'get_reset_cause'

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].

---

 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(-)
arch/arm/cpu/arm1136/mx31/generic.c +1 -1
index 060d46b..df8ebfc 100644
@@ -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 =
arch/arm/cpu/arm1136/mx35/generic.c +1 -1
index bc98edd..6dd8116 100644
@@ -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 =
arch/arm/cpu/arm926ejs/mx25/generic.c +1 -1
index 8912098..9f37f4d 100644
@@ -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 =
arch/arm/cpu/armv7/vf610/generic.c +1 -1
index 92aaad9..aea0c0d 100644
@@ -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;
arch/arm/imx-common/cpu.c +1 -1
index 067d08f..b985f18 100644
@@ -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;
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 arm: imx: Fix conflicting definition types of 'get_reset_cause'

Quoted 10 lines · Otavio Salvador

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)
Quoted 7 lines

`----

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

Fixes [YOCTO: #7384].

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

#2 lore raw

PATCH 1/1 arm: imx: Fix conflicting definition types of 'get_reset_cause'

Hi Marek, Otavio,

Quoted 13 lines · Marek Vasut
Quoted 12 lines · Otavio Salvador

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)

`----

Quoted 9 lines
Quoted 5 lines

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

Fixes [YOCTO: #7384].

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

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/1 arm: imx: Fix conflicting definition types of 'get_reset_cause'

Quoted 22 lines · Stefano Babic

Hi Marek, Otavio,

Quoted 19 lines · Marek Vasut
Quoted 17 lines · Otavio Salvador

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].

Quoted 7 lines
Quoted 3 lines

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!

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750