Skip to content
Commit 952a11ca authored by Paul Fertser's avatar Paul Fertser Committed by Guenter Roeck
Browse files

hwmon: cleanup non-bool "valid" data fields



We have bool so use it consistently in all the drivers.

The following Coccinelle script was used:

@@
identifier T;
type t = { char, int };
@@
struct T {
...
-	t valid;
+	bool valid;
...
}

@@
identifier v;
@@
(
- v->valid = 0
+ v->valid = false
|
- v->valid = 1
+ v->valid = true
)

followed by sed to fixup the comments:
sed '/bool valid;/{s/!=0/true/;s/zero/false/}'

Few whitespace changes were fixed manually. All modified drivers were
compile-tested.

Signed-off-by: default avatarPaul Fertser <fercerpav@gmail.com>
Link: https://lore.kernel.org/r/20210924195202.27917-1-fercerpav@gmail.com


[groeck: Fixed up 'u8 valid' to 'boool valid' in atxp1.c]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent b87783e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment