Skip to contentSkip to conversation

power: Fix style error in Macros

PATCH Anton Vorontsov 1 participant 1 message Jul 8, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 5 lines · Ken O'Brien

Two Macros in the changed file contained complex expressions which were not enclosed by parentheses.

---

Appled, thanks.

Quoted 22 lines
 drivers/power/apm_power.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/power/apm_power.c +4 -4
index dc628cb..8a612de 100644
@@ -14,11 +14,11 @@
 #include <linux/apm-emulation.h>
 
 
-#define PSY_PROP(psy, prop, val) psy->get_property(psy, \
-			 POWER_SUPPLY_PROP_##prop, val)
+#define PSY_PROP(psy, prop, val) (psy->get_property(psy, \
+			 POWER_SUPPLY_PROP_##prop, val))
 
-#define _MPSY_PROP(prop, val) main_battery->get_property(main_battery, \
-							 prop, val)
+#define _MPSY_PROP(prop, val) (main_battery->get_property(main_battery, \
+							 prop, val))
 
 #define MPSY_PROP(prop, val) _MPSY_PROP(POWER_SUPPLY_PROP_##prop, val)