diff options
author | Nathan Chancellor <nathan@kernel.org> | 2021-10-18 11:25:37 -0700 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-10-19 17:18:49 +0200 |
commit | fd96e35ea7b95f1e216277805be89d66e4ae962d (patch) | |
tree | 5fe75d215fbce0262c4535ad682d8cdd4e27dedc /sound | |
parent | 33ce79be2784bb7c327ef0f3be184936238c91d3 (diff) | |
download | linux-stable-fd96e35ea7b95f1e216277805be89d66e4ae962d.tar.gz linux-stable-fd96e35ea7b95f1e216277805be89d66e4ae962d.tar.bz2 linux-stable-fd96e35ea7b95f1e216277805be89d66e4ae962d.zip |
platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
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.
Fixes: fe98a52ce754 ("ACPI: thinkpad-acpi: add sysfs support to fan subdriver")
Link: https://github.com/ClangBuiltLinux/linux/issues/1476
Reported-by: Tor Vic <torvic9@mailbox.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20211018182537.2316800-1-nathan@kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions