linux-stable/drivers/platform
Nathan Chancellor 62a0a0539d platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning
[ Upstream commit fd96e35ea7 ]

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: fe98a52ce7 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 19:16:34 +01:00
..
chrome platform/chrome: cros_ec_trace: Fix format warnings 2021-08-30 17:46:55 -07:00
goldfish platform/goldfish: Convert pipe tasklet to threaded irq 2021-01-27 14:57:06 +01:00
mellanox platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes 2021-10-11 14:57:22 +02:00
mips MIPS: Loongson: Fix boot warning about hwmon_device_register() 2020-07-16 10:49:55 +02:00
olpc Platform: OLPC: Constify static struct regulator_ops 2021-02-08 16:59:21 +01:00
surface platform/surface: aggregator_registry: Add support for Surface Laptop Studio 2021-11-18 19:15:59 +01:00
x86 platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning 2021-11-18 19:16:34 +01:00
Kconfig platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00
Makefile platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00