Skip to contentSkip to conversation

hwmon: (smm655) Fix checkpatch error

PATCH In review Guenter Roeck 1 participant 1 message Jan 20, 2012 Hardware monitoring

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 12/13 hwmon: (smm655) Fix checkpatch error

Fix:
ERROR: Macros with complex values should be enclosed in parenthesis

---
 drivers/hwmon/smm665.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/smm665.c +2 -2
index 5ae028b..5877078 100644
@@ -124,9 +124,9 @@ enum chips { smm465, smm665, smm665c, smm764, smm766 };
 #define SMM665_AIN_ADC_TO_VOLTS(adc)   ((adc) * vref / 512)
 
 /* Temp Sensor */
-#define SMM665_TEMP_ADC_TO_CELSIUS(adc) ((adc) <= 511) ?		   \
+#define SMM665_TEMP_ADC_TO_CELSIUS(adc) (((adc) <= 511) ?		   \
 					 ((int)(adc) * 1000 / 4) :	   \
-					 (((int)(adc) - 0x400) * 1000 / 4)
+					 (((int)(adc) - 0x400) * 1000 / 4))
 
 #define SMM665_NUM_ADC		11
 
Signature · 7 lines
1.7.5.4


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors