A new warning in clang points out a use of bitwise OR with boolean expressions in this driver: drivers/platform/x86/thinkpad_acpi.c:9061:11: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] else if ((strlencmp(cmd, "level disengaged") == 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ || drivers/platform/x86/thinkpad_acpi.c:9061:11: note: cast one or both operands to int to silence this warning 1 error generated. This should clearly be a logical OR so change it to fix the warning.
Unified · Split
| @@ -9058,7 +9058,7 @@ static int fan_write_cmd_level(const char *cmd, int *rc) · 9057 unmodified lines | ||
| 9058 | 9058 | |
| 9059 | 9059 | if (strlencmp(cmd, "level auto") == 0) |
| 9060 | 9060 | level = TP_EC_FAN_AUTO; |
| 9061 | − else if ((strlencmp(cmd, "level disengaged") == 0) | | |
| 9061 | + else if ((strlencmp(cmd, "level disengaged") == 0) || | |
| 9062 | 9062 | (strlencmp(cmd, "level full-speed") == 0)) |
| 9063 | 9063 | level = TP_EC_FAN_FULLSPEED; |
| 9064 | 9064 | else if (sscanf(cmd, "level %d", &level) != 1) |