Skip to contentSkip to conversation

Trivial series

PATCH New Felipe Balbi 3 participants 7 messages Oct 19, 2010 – Nov 8, 2010

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

cover Trivial series

Hi Tony,

found these while compiling n770_defconfig. Probably worth sending to mainline anyway ?

Felipe Balbi (2):
arm: omap1: devices: need to return with a value
arm: omap1: remove unused variables

 arch/arm/mach-omap1/devices.c |    2 +-
 arch/arm/mach-omap1/mailbox.c |    1 -
 arch/arm/mach-omap1/pm_bus.c  |    1 -
 3 files changed, 1 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.3.rc0.35.g8ac8c
#1 lore raw

PATCH 1/2 arm: omap1: devices: need to return with a value

Get rid of the following warning:

arch/arm/mach-omap1/devices.c: In function 'omap_init_wdt':
arch/arm/mach-omap1/devices.c:298: warning: 'return' with no value, in function returning non-void

---
 arch/arm/mach-omap1/devices.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/devices.c +1 -1
index 63d68cf..a037aba 100644
@@ -295,7 +295,7 @@ static struct platform_device omap_wdt_device = {
 static int __init omap_init_wdt(void)
 {
 	if (!cpu_is_omap16xx())
-		return;
+		return -ENODEV;
 
 	platform_device_register(&omap_wdt_device);
 	return 0;
Signature · 1 line
1.7.3.rc0.35.g8ac8c
#2 lore raw

PATCH 1/2 arm: omap1: devices: need to return with a value

Quoted 16 lines · Felipe Balbi

Get rid of the following warning:

arch/arm/mach-omap1/devices.c: In function 'omap_init_wdt':
arch/arm/mach-omap1/devices.c:298: warning: 'return' with no value, in function returning non-void

---
 arch/arm/mach-omap1/devices.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/devices.c +0 -0
index 63d68cf..a037aba 100644

arch/arm/mach-omap1/devices.c static struct platform_device omap_wdt_device = { · line 301

Quoted 8 lines
arch/arm/mach-omap1/devices.c +1 -1
@@ -295,7 +295,7 @@ static struct platform_device omap_wdt_device = {
 static int __init omap_init_wdt(void)
 {
 	if (!cpu_is_omap16xx())
-		return;
+		return -ENODEV;
 
 	platform_device_register(&omap_wdt_device);
 	return 0;

It's unrelated to this patch, but using

	return platform_device_register(&omap_wdt_device);

would be a bit cleaner.

Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
reviewer
#3 lore raw

PATCH 1/2 arm: omap1: devices: need to return with a value

Quoted 23 lines · Uwe Kleine-K?nig
Quoted 22 lines · Felipe Balbi

Get rid of the following warning:

arch/arm/mach-omap1/devices.c: In function 'omap_init_wdt':
arch/arm/mach-omap1/devices.c:298: warning: 'return' with no value, in function returning non-void

---
 arch/arm/mach-omap1/devices.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap1/devices.c +1 -1
index 63d68cf..a037aba 100644
@@ -295,7 +295,7 @@ static struct platform_device omap_wdt_device = {
 static int __init omap_init_wdt(void)
 {
 	if (!cpu_is_omap16xx())
-		return;
+		return -ENODEV;
 
Quoted 7 lines

arch/arm/mach-omap1/devices.c static struct platform_device omap_wdt_device = { · line 301

Quoted 2 lines
arch/arm/mach-omap1/devices.c +0 -0
 	platform_device_register(&omap_wdt_device);
 	return 0;

It's unrelated to this patch, but using

	return platform_device_register(&omap_wdt_device);

would be a bit cleaner.

Felipe, care to update this one?

Tony

#4 lore raw

PATCH 1/1 arm: omap1: devices: need to return with a value

Get rid of the following warning:

arch/arm/mach-omap1/devices.c: In function 'omap_init_wdt':
arch/arm/mach-omap1/devices.c:298: warning: 'return' with no value, in function returning non-void

while at that, also change:

platform_device_register();
return 0;

into:

return platform_device_register();

---
 arch/arm/mach-omap1/devices.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-omap1/devices.c +2 -3
index ea0d80a..e7f9ee6 100644
@@ -321,10 +321,9 @@ static struct platform_device omap_wdt_device = {
 static int __init omap_init_wdt(void)
 {
 	if (!cpu_is_omap16xx())
-		return;
+		return -ENODEV;
 
-	platform_device_register(&omap_wdt_device);
-	return 0;
+	return platform_device_register(&omap_wdt_device);
 }
 subsys_initcall(omap_init_wdt);
 #endif
Signature · 1 line
1.7.3.2.146.gca209
#5 lore raw

PATCH 2/2 arm: omap1: remove unused variables

In reply to Felipe Balbi

Get rid of the following warnings:

arch/arm/mach-omap1/pm_bus.c: In function 'omap1_pm_runtime_resume':
arch/arm/mach-omap1/pm_bus.c:51: warning: unused variable 'ret' arch/arm/mach-omap1/mailbox.c: In function 'omap1_mbox_probe':
arch/arm/mach-omap1/mailbox.c:148: warning: unused variable 'i'

---
 arch/arm/mach-omap1/mailbox.c |    1 -
 arch/arm/mach-omap1/pm_bus.c  |    1 -
 2 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-omap1/mailbox.c +0 -1
index 1a85a42..1add133 100644
@@ -145,7 +145,6 @@ static int __devinit omap1_mbox_probe(struct platform_device *pdev)
 {
 	struct resource *mem;
 	int ret;
-	int i;
 	struct omap_mbox **list;
 
 	list = omap1_mboxes;
arch/arm/mach-omap1/pm_bus.c +0 -1
index 8b66392..f97c6e9 100644
@@ -48,7 +48,6 @@ static int omap1_pm_runtime_suspend(struct device *dev)
 
 static int omap1_pm_runtime_resume(struct device *dev)
 {
-	int ret = 0;
 	struct clk *iclk, *fclk;
 
 	dev_dbg(dev, "%s\n", __func__);
Signature · 1 line
1.7.3.rc0.35.g8ac8c
reviewer
#6 lore raw

PATCH 2/2 arm: omap1: remove unused variables

Quoted 6 lines · Felipe Balbi

Get rid of the following warnings:

arch/arm/mach-omap1/pm_bus.c: In function 'omap1_pm_runtime_resume':
arch/arm/mach-omap1/pm_bus.c:51: warning: unused variable 'ret' arch/arm/mach-omap1/mailbox.c: In function 'omap1_mbox_probe':
arch/arm/mach-omap1/mailbox.c:148: warning: unused variable 'i'

Assuming Hiroshi will queue up this one.

Tony