linux/drivers/macintosh
Nathan Chancellor b655ba93b5 macintosh: windfarm: Use unsigned type for 1-bit bitfields
[ Upstream commit 748ea32d2d ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-17 08:50:31 +01:00
..
ams macintosh/ams: Adapt declaration of ams_i2c_remove() to earlier change 2022-09-17 20:37:23 +02:00
adb-iop.c
adb.c macintosh/adb: fix oob read in do_adb_query() function 2022-07-20 22:06:30 +10:00
adbhid.c
ans-lcd.c
ans-lcd.h
apm_emu.c
Kconfig
mac_hid.c
macio_asic.c macintosh: fix possible memory leak in macio_add_one_device() 2022-12-31 13:32:50 +01:00
macio_sysfs.c
macio-adb.c macintosh/macio-adb: check the return value of ioremap() 2022-12-31 13:32:50 +01:00
Makefile
mediabay.c
rack-meter.c
smu.c
therm_adt746x.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
therm_windtunnel.c powerpc updates for 6.1 2022-10-09 14:05:15 -07:00
via-cuda.c
via-macii.c
via-pmu-backlight.c
via-pmu-event.c
via-pmu-event.h
via-pmu-led.c
via-pmu.c
windfarm_ad7417_sensor.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
windfarm_core.c
windfarm_cpufreq_clamp.c
windfarm_fcu_controls.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
windfarm_lm75_sensor.c macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-03-17 08:50:31 +01:00
windfarm_lm87_sensor.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
windfarm_max6690_sensor.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
windfarm_mpu.h
windfarm_pid.c
windfarm_pid.h
windfarm_pm72.c
windfarm_pm81.c
windfarm_pm91.c
windfarm_pm112.c
windfarm_pm121.c
windfarm_rm31.c
windfarm_smu_controls.c
windfarm_smu_sat.c i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
windfarm_smu_sensors.c macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-03-17 08:50:31 +01:00
windfarm.h