Skip to contentSkip to conversation

OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get()

PATCH In review Roel Kluin 2 participants 3 messages Dec 16, 2009

Subsystems (4)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 OMAP: omap3_pm_get_suspend_state() error ignored in pwrdm_suspend_get()

val is an u64 pointer, we need an int to check the error.

---
Found using coccinelle: http://coccinelle.lip6.fr/

arch/arm/mach-omap2/pm-debug.c +4 -2
index 860b755..081ca85 100644
@@ -488,9 +488,11 @@ int pm_dbg_regset_init(int reg_set)
 
 static int pwrdm_suspend_get(void *data, u64 *val)
 {
-	*val = omap3_pm_get_suspend_state((struct powerdomain *)data);
+	int ret;
+	ret = omap3_pm_get_suspend_state((struct powerdomain *)data);
+	*val = ret;
 
-	if (*val >= 0)
+	if (ret >= 0)
 		return 0;
 	return *val;
 }
#1 lore raw
Quoted 3 lines · Roel Kluin

val is an u64 pointer, we need an int to check the error.

Thanks, will queue this in my PM fixes queue for .33-rc series.

Kevin

Quoted 26 lines

---
Found using coccinelle: http://coccinelle.lip6.fr/

arch/arm/mach-omap2/pm-debug.c +4 -3
index 860b755..081ca85 100644
@@ -488,9 +488,11 @@ int pm_dbg_regset_init(int reg_set)
 
 static int pwrdm_suspend_get(void *data, u64 *val)
 {
-	*val = omap3_pm_get_suspend_state((struct powerdomain *)data);
+	int ret;
+	ret = omap3_pm_get_suspend_state((struct powerdomain *)data);
+	*val = ret;
 
-	if (*val >= 0)
+	if (ret >= 0)
 		return 0;
 	return *val;
 }
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Roel Kluin
Quoted 3 lines · Roel Kluin

val is an u64 pointer, we need an int to check the error.

Thanks, will queue this in my PM fixes queue for .33-rc series.

Kevin

Quoted 26 lines

---
Found using coccinelle: http://coccinelle.lip6.fr/

arch/arm/mach-omap2/pm-debug.c +4 -3
index 860b755..081ca85 100644
@@ -488,9 +488,11 @@ int pm_dbg_regset_init(int reg_set)
 
 static int pwrdm_suspend_get(void *data, u64 *val)
 {
-	*val = omap3_pm_get_suspend_state((struct powerdomain *)data);
+	int ret;
+	ret = omap3_pm_get_suspend_state((struct powerdomain *)data);
+	*val = ret;
 
-	if (*val >= 0)
+	if (ret >= 0)
 		return 0;
 	return *val;
 }
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/