linux/drivers/macintosh
Nathan Chancellor 748ea32d2d macintosh: windfarm: Use unsigned type for 1-bit bitfields
Clang warns:

  drivers/macintosh/windfarm_lm75_sensor.c:63:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                  lm->inited = 1;
                             ^ ~

  drivers/macintosh/windfarm_smu_sensors.c:356:19: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                  pow->fake_volts = 1;
                                  ^ ~
  drivers/macintosh/windfarm_smu_sensors.c:368:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                  pow->quadratic = 1;
                                 ^ ~

There is no bug here since no code checks the actual value of these
fields, just whether or not they are zero (boolean context), but this
can be easily fixed by switching to an unsigned type.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230215-windfarm-wsingle-bit-bitfield-constant-conversion-v1-1-26415072e855@kernel.org
2023-02-16 10:16:31 +11:00
..
ams macintosh/ams/ams: Add header file macro definition 2022-11-24 23:12:17 +11:00
adb-iop.c macintosh/adb-iop: Use big-endian autopoll mask 2021-01-25 13:23:38 +01:00
adb.c macintosh/adb: Fix warning comparing pointer to 0 2022-11-24 23:12:17 +11:00
adbhid.c macintosh/adb: Use swap() to make code cleaner 2022-05-04 19:37:45 +10:00
ans-lcd.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
ans-lcd.h misc: cleanup minor number definitions in c file into miscdevice.h 2020-03-18 12:27:03 +01:00
apm_emu.c
Kconfig macintosh: via-pmu and via-cuda need RTC_LIB 2022-05-22 15:58:30 +10:00
mac_hid.c macintosh/mac_hid.c: simplify subdirectory registration with register_sysctl() 2022-01-22 08:33:35 +02:00
macio_asic.c macintosh: fix possible memory leak in macio_add_one_device() 2022-11-24 23:12:18 +11:00
macio_sysfs.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
macio-adb.c macintosh/macio-adb: check the return value of ioremap() 2022-11-24 23:12:18 +11:00
Makefile macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled 2022-05-22 15:58:30 +10:00
mediabay.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
rack-meter.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
smu.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
therm_adt746x.c macintosh/therm_adt746x: Convert to i2c's .probe_new() 2022-11-24 23:12:16 +11:00
therm_windtunnel.c macintosh/therm_windtunnel: Convert to i2c's .probe_new() 2022-11-24 23:12:16 +11:00
via-cuda.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
via-macii.c isystem: trim/fixup stdarg.h and other headers 2021-08-19 09:02:55 +09:00
via-pmu-backlight.c macintosh/via-pmu-backlight: Use backlight helper 2022-11-24 23:12:17 +11:00
via-pmu-event.c
via-pmu-event.h
via-pmu-led.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
via-pmu.c macintosh/via-pmu: Avoid compiler warnings when CONFIG_PROC_FS is disabled 2022-11-24 23:12:17 +11:00
windfarm_ad7417_sensor.c macintosh/windfarm_ad7417_sensor: Convert to i2c's .probe_new() 2022-11-24 23:12:16 +11:00
windfarm_core.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
windfarm_cpufreq_clamp.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
windfarm_fcu_controls.c macintosh/windfarm_fcu_controls: Convert to i2c's .probe_new() 2022-11-24 23:12:16 +11:00
windfarm_lm75_sensor.c macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-02-16 10:16:31 +11:00
windfarm_lm87_sensor.c macintosh/windfarm_lm87_sensor: Convert to i2c's .probe_new() 2022-11-24 23:12:16 +11:00
windfarm_max6690_sensor.c macintosh/windfarm_max6690_sensor: Convert to i2c's .probe_new() 2022-11-24 23:12:16 +11:00
windfarm_mpu.h macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
windfarm_pid.c
windfarm_pid.h macintosh/windfarm_pid: Add header file macro definition 2022-11-24 23:12:18 +11:00
windfarm_pm72.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
windfarm_pm81.c macintosh/windfarm_pm81: Fix warning comparing pointer to 0 2022-11-24 23:12:17 +11:00
windfarm_pm91.c macintosh/windfarm_pm91: Fix warning comparing pointer to 0 2022-11-24 23:12:17 +11:00
windfarm_pm112.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
windfarm_pm121.c macintosh/windfarm_pm121: Fix warning comparing pointer to 0 2022-11-24 23:12:17 +11:00
windfarm_rm31.c macintosh: Prepare cleanup of powerpc's asm/prom.h 2022-05-11 23:06:39 +10:00
windfarm_smu_controls.c macintosh: Switch to use for_each_child_of_node() macro 2022-11-24 23:12:18 +11:00
windfarm_smu_sat.c macintosh/windfarm_smu_sat: Convert to i2c's .probe_new() 2022-11-24 23:12:16 +11:00
windfarm_smu_sensors.c macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-02-16 10:16:31 +11:00
windfarm.h