Skip to contentSkip to conversation

hwmon: abx500: style: Simplify bool comparison

PATCH In review YANG LI 2 participants 2 messages Jan 11, 2021 – Jan 21, 2021 Hardware monitoring

lore
Share & tools
lore

YANG LI

author
#0 lore raw

PATCH 1/1 hwmon: abx500: style: Simplify bool comparison

Fix the following coccicheck warning:
./drivers/hwmon/abx500.c:84:8-26: WARNING: Comparison to bool

---
 drivers/hwmon/abx500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/abx500.c +1 -1
index 4b96488..3879b13 100644
@@ -81,7 +81,7 @@ static void gpadc_monitor(struct work_struct *work)
 
 		if (data->min[i] != 0) {
 			if (temp < data->min[i]) {
-				if (data->min_alarm[i] == false) {
+				if (!data->min_alarm[i]) {
 					data->min_alarm[i] = true;
 					updated_min_alarm = true;
 				}
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 5 lines · YANG LI

Fix the following coccicheck warning:
./drivers/hwmon/abx500.c:84:8-26: WARNING: Comparison to bool

This driver will be removed in v5.11.

Guenter

Quoted 17 lines
---
 drivers/hwmon/abx500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/abx500.c +1 -1
index 4b96488..3879b13 100644
@@ -81,7 +81,7 @@ static void gpadc_monitor(struct work_struct *work)
 
 		if (data->min[i] != 0) {
 			if (temp < data->min[i]) {
-				if (data->min_alarm[i] == false) {
+				if (!data->min_alarm[i]) {
 					data->min_alarm[i] = true;
 					updated_min_alarm = true;
 				}