linux/drivers/platform/x86
Nathan Chancellor fd96e35ea7 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: 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>
2021-10-19 17:18:49 +02:00
..
dell platform/x86: dell: Make DELL_WMI_PRIVACY depend on DELL_WMI 2021-10-11 15:25:05 +02:00
intel platform/x86: int1092: Fix non sequential device mode handling 2021-10-11 16:38:32 +02:00
acer-wireless.c
acer-wmi.c platform/x86: acer-wmi: use __packed instead of __attribute__((packed)) 2021-09-14 12:27:15 +02:00
acerhdf.c
adv_swbutton.c
amd-pmc.c platform/x86: amd-pmc: Add alternative acpi id for PMC controller 2021-10-11 15:47:14 +02:00
amilo-rfkill.c
apple-gmux.c
asus-laptop.c
asus-nb-wmi.c platform/x86: asus-nb-wmi: Add tablet_mode_sw=lid-flip quirk for the TP200s 2021-08-12 17:18:28 +02:00
asus-wireless.c
asus-wmi.c platform/x86: asus-wmi: Fix "unsigned 'retval' is never less than zero" smatch warning 2021-08-26 15:12:51 +02:00
asus-wmi.h
classmate-laptop.c
compal-laptop.c
dual_accel_detect.h platform/x86: dual_accel_detect: Use the new i2c_acpi_client_count() helper 2021-08-12 17:26:36 +02:00
eeepc-laptop.c
eeepc-wmi.c
firmware_attributes_class.c
firmware_attributes_class.h
fujitsu-laptop.c
fujitsu-tablet.c
gigabyte-wmi.c platform/x86: gigabyte-wmi: add support for B550 AORUS ELITE AX V2 2021-10-11 15:52:58 +02:00
gpd-pocket-fan.c
hdaps.c
hp-wmi.c platform/x86: hp-wmi: add support for omen laptops 2021-09-14 12:26:00 +02:00
hp_accel.c platform/x86: hp_accel: Convert to be a platform driver 2021-08-26 15:10:05 +02:00
huawei-wmi.c
i2c-multi-instantiate.c platform/x86: i2c-multi-instantiate: Use the new i2c_acpi_client_count() helper 2021-08-12 17:26:36 +02:00
ibm_rtl.c
ideapad-laptop.c platform: x86: ideapad-laptop: Use ACPI_COMPANION() directly 2021-10-19 16:55:56 +02:00
intel_ips.c
intel_ips.h
intel_scu_ipc.c platform/x86: intel_scu_ipc: Update timeout value in comment 2021-10-11 15:32:44 +02:00
intel_scu_ipcutil.c
intel_scu_pcidrv.c
intel_scu_pltdrv.c
intel_scu_wdt.c
Kconfig platform/x86: Rename wmaa-backlight-wmi to nvidia-wmi-ec-backlight 2021-10-11 14:59:45 +02:00
lg-laptop.c platform: lg-laptop: drop unneeded MODULE_ALIAS 2021-09-21 14:50:35 +02:00
Makefile platform/x86: Rename wmaa-backlight-wmi to nvidia-wmi-ec-backlight 2021-10-11 14:59:45 +02:00
meraki-mx100.c platform/x86: add meraki-mx100 platform driver 2021-08-12 09:26:28 +02:00
mlx-platform.c platform/x86: mlx-platform: Add support for multiply cooling devices 2021-10-19 10:57:20 +02:00
msi-laptop.c
msi-wmi.c
mxm-wmi.c
nvidia-wmi-ec-backlight.c platform/x86: Rename wmaa-backlight-wmi to nvidia-wmi-ec-backlight 2021-10-11 14:59:45 +02:00
panasonic-laptop.c platform/x86: panasonic-laptop: Replace snprintf in show functions with sysfs_emit 2021-10-19 16:59:44 +02:00
pcengines-apuv2.c platform/x86: pcengines-apuv2: Add missing terminating entries to gpio-lookup tables 2021-08-06 14:04:43 +02:00
peaq-wmi.c
pmc_atom.c
samsung-laptop.c
samsung-q10.c
sony-laptop.c
system76_acpi.c platform/x86: system76_acpi: Add attribute group for kb_led_color 2021-10-19 16:31:17 +02:00
tc1100-wmi.c
think-lmi.c platform/x86: think-lmi: add debug_cmd 2021-08-18 09:41:14 +02:00
think-lmi.h platform/x86: think-lmi: add debug_cmd 2021-08-18 09:41:14 +02:00
thinkpad_acpi.c platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning 2021-10-19 17:18:49 +02:00
topstar-laptop.c
toshiba-wmi.c
toshiba_acpi.c
toshiba_bluetooth.c
toshiba_haps.c
touchscreen_dmi.c platform/x86: touchscreen_dmi: Update info for the Chuwi Hi10 Plus (CWI527) tablet 2021-09-13 10:41:56 +02:00
uv_sysfs.c
wireless-hotkey.c platform/x86: wireless-hotkey: remove hardcoded "hp" from the error message 2021-07-14 22:32:26 +02:00
wmi-bmof.c
wmi.c platform/x86: wmi: more detailed error reporting in find_guid() 2021-09-14 12:26:03 +02:00
xiaomi-wmi.c
xo1-rfkill.c
xo15-ebook.c