Skip to content

IIO: clang W=1 warning cleanup.

Jonathan Cameron linux-iio llvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12iio:accel:bma180: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/accel/bma180.c+1 -10 replies
2/12iio:dc:ina2xx-adc: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/adc/ina2xx-adc.c+1 -10 replies
3/12iio:adc:rcar: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/adc/rcar-gyroadc.c+1 -20 replies
4/12iio:adc:ti-ads1015: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/adc/ti-ads1015.c+1 -10 replies
5/12iio:amplifiers:hmc425a: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/amplifiers/hmc425a.c+1 -10 replies
6/12iio:dac:mcp4725: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/dac/mcp4725.c+1 -10 replies
7/12iio:imu:inv_icm42600: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c+2 -20 replies
8/12iio:imu:inv_mpu6050: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c+2 -20 replies
9/12iio:magn:ak8975: Suppress clang W=1 warning about pointer to enum conversion.drivers/iio/magnetometer/ak8975.c+1 -10 replies
10/12iio:dummy: Drop set but unused variable len.drivers/iio/dummy/iio_simple_dummy_buffer.c+0 -20 replies
11/12iio:accel:bmc150: Mark structure __maybe_unused as only needed with for pm ops.drivers/iio/accel/bmc150-accel-core.c+1 -10 replies
12/12iio:accel:kxcjk-1013: Mark struct __maybe_unused to avoid warning.drivers/iio/accel/kxcjk-1013.c+1 -10 replies

Reviews trailers per patch

None of the 12 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNathan Chancellor
SeriesR-b
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] IIO: clang W=1 warning cleanup.

From: Jonathan Cameron <[email protected]>

Hi All,

In the interests of noise reduction in warnings during build tests of new code, this series suppresses a bunch of warnings seen with LLVM=1 W=1.

Note I am seeing two others I haven't fixed here. One is tied up in the existing CONFIG_PM* cleanup patch set and will be dealt with as part of that. The other in tsl2772 looks like it might be a bug that needs further analysis. If anyone is curious:

drivers/iio/light/tsl2772.c:576:24: warning: variable 'prox_diode_mask' set but not used [-Wunused-but-set-variable]

        int i, ret, num_leds, prox_diode_mask;     

As is common with series like this, some of the drivers are old and as such I haven't cc'd original authors etc and would appreciate a sanity check from anyone who has the time.

Mauro and Arnd are cc'd on a bunch of them because a media patch that I happened to see had similar fixes + discussion of type to use in the casting. For some others I've just picked on people who touched the driver in last year or so.

Nothing in this series should have any functional affect.

Jonathan

Cc Arnd Bergmann <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Stephan Gerhold <[email protected]>
Cc Jean-Baptiste Maneyrol <[email protected]>
Cc Baptiste Mansuy <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Jonathan Albrieux <[email protected]>

Jonathan Cameron (12):
iio:accel:bma180: Suppress clang W=1 warning about pointer to enum
conversion.
iio:dc:ina2xx-adc: Suppress clang W=1 warning about pointer to enum
conversion.
iio:adc:rcar: Suppress clang W=1 warning about pointer to enum
conversion.
iio:adc:ti-ads1015: Suppress clang W=1 warning about pointer to enum
conversion.
iio:amplifiers:hmc425a: Suppress clang W=1 warning about pointer to
enum conversion.
iio:dac:mcp4725: Suppress clang W=1 warning about pointer to enum
conversion.
iio:imu:inv_icm42600: Suppress clang W=1 warning about pointer to enum
conversion.
iio:imu:inv_mpu6050: Suppress clang W=1 warning about pointer to enum
conversion.
iio:magn:ak8975: Suppress clang W=1 warning about pointer to enum
conversion.
iio:dummy: Drop set but unused variable len. iio:accel:bmc150: Mark structure __maybe_unused as only needed with
for pm ops.
iio:accel:kxcjk-1013: Mark struct __maybe_unused to avoid warning.

 drivers/iio/accel/bma180.c                      | 2 +-
 drivers/iio/accel/bmc150-accel-core.c           | 2 +-
 drivers/iio/accel/kxcjk-1013.c                  | 2 +-
 drivers/iio/adc/ina2xx-adc.c                    | 2 +-
 drivers/iio/adc/rcar-gyroadc.c                  | 3 +--
 drivers/iio/adc/ti-ads1015.c                    | 2 +-
 drivers/iio/amplifiers/hmc425a.c                | 2 +-
 drivers/iio/dac/mcp4725.c                       | 2 +-
 drivers/iio/dummy/iio_simple_dummy_buffer.c     | 2 --
 drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c | 2 +-
 drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c       | 2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c       | 2 +-
 drivers/iio/magnetometer/ak8975.c               | 2 +-
 14 files changed, 13 insertions(+), 16 deletions(-)
Signature · 1 line
2.34.1