From 24f9c539b9b7ef8fcc97741027a31f40ef399741 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Thu, 10 Jan 2013 05:54:40 -0800 Subject: hwmon: Fix 'Macros with complex values' checkpatch errors Fix: ERROR: Macros with complex values should be enclosed in parenthesis when it is seen due to complex code and not due to multi-line variable declarations. Cc: Hans de Goede Cc: Alistair John Strachan Acked-by: Alistair John Strachan Signed-off-by: Guenter Roeck --- drivers/hwmon/abituguru3.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/hwmon/abituguru3.c') diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index dcce352e77f6..1d2da31c27c6 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c @@ -76,9 +76,11 @@ #define ABIT_UGURU3_SYNCHRONIZE_TIMEOUT 5 /* utility macros */ #define ABIT_UGURU3_NAME "abituguru3" -#define ABIT_UGURU3_DEBUG(format, arg...) \ - if (verbose) \ - pr_debug(format , ## arg) +#define ABIT_UGURU3_DEBUG(format, arg...) \ + do { \ + if (verbose) \ + pr_debug(format , ## arg); \ + } while (0) /* Macros to help calculate the sysfs_names array length */ #define ABIT_UGURU3_MAX_NO_SENSORS 26 @@ -1159,7 +1161,7 @@ static int abituguru3_resume(struct device *dev) } static SIMPLE_DEV_PM_OPS(abituguru3_pm, abituguru3_suspend, abituguru3_resume); -#define ABIT_UGURU3_PM &abituguru3_pm +#define ABIT_UGURU3_PM (&abituguru3_pm) #else #define ABIT_UGURU3_PM NULL #endif /* CONFIG_PM */ -- cgit v1.2.3