Skip to contentSkip to conversation

ARM: kirkwood: kirkwood_pm_init() should return void

PATCH New Ezequiel Garcia 3 participants 4 messages Jan 17, 2014 – Jan 19, 2014

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

PATCH 1/1 ARM: kirkwood: kirkwood_pm_init() should return void

This function was originally meant to return void as declared in the common.h header. Fix it and include the header to catch these errors in the future.

---
 arch/arm/mach-kirkwood/pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-kirkwood/pm.c +2 -1
index 8783a71..c11f7f5 100644
@@ -18,6 +18,7 @@
 #include <linux/suspend.h>
 #include <linux/io.h>
 #include <mach/bridge-regs.h>
+#include "common.h"
 
 static void __iomem *ddr_operation_base;
 
@@ -65,7 +66,7 @@ static const struct platform_suspend_ops kirkwood_suspend_ops = {
 	.valid = kirkwood_pm_valid_standby,
 };
 
-int __init kirkwood_pm_init(void)
+void __init kirkwood_pm_init(void)
 {
 	ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4);
 	suspend_set_ops(&kirkwood_suspend_ops);
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/1 ARM: kirkwood: kirkwood_pm_init() should return void

Quoted 6 lines · Ezequiel Garcia

This function was originally meant to return void as declared in the common.h header. Fix it and include the header to catch these errors in the future.

Andrew

Quoted 33 lines
---
 arch/arm/mach-kirkwood/pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-kirkwood/pm.c +2 -1
index 8783a71..c11f7f5 100644
@@ -18,6 +18,7 @@
 #include <linux/suspend.h>
 #include <linux/io.h>
 #include <mach/bridge-regs.h>
+#include "common.h"
 
 static void __iomem *ddr_operation_base;
 
@@ -65,7 +66,7 @@ static const struct platform_suspend_ops kirkwood_suspend_ops = {
 	.valid = kirkwood_pm_valid_standby,
 };
 
-int __init kirkwood_pm_init(void)
+void __init kirkwood_pm_init(void)
 {
 	ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4);
 	suspend_set_ops(&kirkwood_suspend_ops);
Signature · 7 lines
1.8.1.5


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH 1/1 ARM: kirkwood: kirkwood_pm_init() should return void

In reply to Ezequiel Garcia
Quoted 9 lines · Ezequiel Garcia

This function was originally meant to return void as declared in the common.h header. Fix it and include the header to catch these errors in the future.

---
 arch/arm/mach-kirkwood/pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

merf. I get the following warning when building kirkwood_defconfig:

arch/arm/mach-kirkwood/pm.c: In function 'kirkwood_pm_init':
arch/arm/mach-kirkwood/pm.c:73:2: warning: 'return' with a value, in function returning void [enabled by default]

I've amended the patch as below and pushed it to mvebu/fixes

thx,

Jason.

--------->8--------------------
commit 77dfdeb41125b6468790fa4c620da262c910cbc9

Author: Ezequiel Garcia <[email protected]>
Date:   Fri Jan 17 15:52:11 2014 -0300

ARM: kirkwood: kirkwood_pm_init() should return void

This function was originally meant to return void as declared in the common.h header. Fix it and include the header to catch these errors in the future.

[jac] removed 'return 0;' to clear this warning:

arch/arm/mach-kirkwood/pm.c: In function 'kirkwood_pm_init':
arch/arm/mach-kirkwood/pm.c:73:2: warning: 'return' with a value, in function returning void [enabled by default]

arch/arm/mach-kirkwood/pm.c +2 -2
index 8783a7184e73..c6ab8d9303a5 100644
@@ -18,6 +18,7 @@
 #include <linux/suspend.h>
 #include <linux/io.h>
 #include <mach/bridge-regs.h>
+#include "common.h"
 
 static void __iomem *ddr_operation_base;
 
@@ -65,9 +66,8 @@ static const struct platform_suspend_ops kirkwood_suspend_ops = {
 	.valid = kirkwood_pm_valid_standby,
 };
 
-int __init kirkwood_pm_init(void)
+void __init kirkwood_pm_init(void)
 {
 	ddr_operation_base = ioremap(DDR_OPERATION_BASE, 4);
 	suspend_set_ops(&kirkwood_suspend_ops);
-	return 0;
 }
#3 lore raw

PATCH 1/1 ARM: kirkwood: kirkwood_pm_init() should return void

Quoted 11 lines · Jason Cooper
Quoted 9 lines · Ezequiel Garcia

This function was originally meant to return void as declared in the common.h header. Fix it and include the header to catch these errors in the future.

---
 arch/arm/mach-kirkwood/pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 5 lines

merf. I get the following warning when building kirkwood_defconfig:

arch/arm/mach-kirkwood/pm.c: In function 'kirkwood_pm_init':
arch/arm/mach-kirkwood/pm.c:73:2: warning: 'return' with a value, in function returning void [enabled by default]

Doh...

Quoted 2 lines

I've amended the patch as below and pushed it to mvebu/fixes

Thanks!

Signature · 3 lines
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com