linux-sg2042/drivers/iio/accel
Gustavo A. R. Silva 74c420e0a5 iio: cros_ec_accel_legacy: Refactor code in cros_ec_accel_legacy_probe
Refactor some code in order to fix both the technical implementation
and the following warnings:

drivers/iio/accel/cros_ec_accel_legacy.c: In function ‘cros_ec_accel_legacy_probe’:
drivers/iio/accel/cros_ec_accel_legacy.c:387:36: warning: this statement may fall through [-Wimplicit-fallthrough=]
    ec_accel_channels[X].scan_index = Y;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/iio/accel/cros_ec_accel_legacy.c:388:3: note: here
   case Y:
   ^~~~
drivers/iio/accel/cros_ec_accel_legacy.c:389:36: warning: this statement may fall through [-Wimplicit-fallthrough=]
    ec_accel_channels[Y].scan_index = X;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/iio/accel/cros_ec_accel_legacy.c:390:3: note: here
   case Z:
   ^~~~

Notice that neither the for loop nor the switch statement is needed.
Also, "state->sign[Y] = 1" should be unconditional.

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04 20:19:50 +01:00
..
Kconfig iio: st-accel: add support for lis3de 2018-11-16 18:32:30 +00:00
Makefile iio: adxl372: Add support for I2C communication 2018-09-08 15:54:38 +01:00
adis16201.c Staging: iio: accel: adis16201: Move adis16201 driver out of staging 2018-03-24 14:26:19 +00:00
adis16209.c Staging: iio: adis16209: Move adis16209 driver out of staging 2018-03-30 13:50:36 +01:00
adxl345.h iio: adxl345: Add support for the ADXL375 2018-07-15 10:18:15 +01:00
adxl345_core.c iio:accel:adxl345: Change alignment to match paranthesis 2019-02-09 18:46:02 +00:00
adxl345_i2c.c iio: adxl345: move null check for i2c id at start of probe 2018-08-19 18:32:05 +01:00
adxl345_spi.c iio: adxl345: Add support for the ADXL375 2018-07-15 10:18:15 +01:00
adxl372.c iio: adxl372: Add support for I2C communication 2018-09-08 15:54:38 +01:00
adxl372.h iio: adxl372: Add support for I2C communication 2018-09-08 15:54:38 +01:00
adxl372_i2c.c iio: adxl372: Add support for I2C communication 2018-09-08 15:54:38 +01:00
adxl372_spi.c iio: adxl372: Refactor the driver 2018-09-08 15:28:27 +01:00
bma180.c iio: accel: bma180: add mount matrix support 2019-04-04 20:19:47 +01:00
bma220_spi.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
bmc150-accel-core.c iio: accel: bmc150: add mount matrix support 2019-04-04 20:19:46 +01:00
bmc150-accel-i2c.c iio: accel: bmc150: Add OF device ID table 2017-12-02 11:59:33 +00:00
bmc150-accel-spi.c iio: accel: bmc150: use common definition for regmap conf 2016-04-03 11:24:52 +01:00
bmc150-accel.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cros_ec_accel_legacy.c iio: cros_ec_accel_legacy: Refactor code in cros_ec_accel_legacy_probe 2019-04-04 20:19:50 +01:00
da280.c iio:accel:da280: Linx 820 Windows tablet has a da280 mapped via ACPI 2017-12-02 10:41:33 +00:00
da311.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
dmard06.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
dmard09.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
dmard10.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
hid-sensor-accel-3d.c iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-11-16 11:42:12 +00:00
kxcjk-1013.c iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID 2018-11-25 12:35:26 +00:00
kxsd9-i2c.c iio: adc/accel: Fix up module licenses 2017-12-02 10:39:43 +00:00
kxsd9-spi.c iio: accel: kxsd9: Deploy system and runtime PM 2016-09-18 11:35:59 +01:00
kxsd9.c iio: Allow to read mount matrix from ACPI 2019-04-04 20:19:46 +01:00
kxsd9.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mc3230.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
mma7455.h iio: accel: add Freescale MMA7455L/MMA7456L 3-axis accelerometer driver 2015-11-01 18:00:35 +00:00
mma7455_core.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
mma7455_i2c.c iio: accel: mma7455_i2c: Add OF device ID table 2017-03-19 10:57:43 +00:00
mma7455_spi.c iio: accel: add Freescale MMA7455L/MMA7456L 3-axis accelerometer driver 2015-11-01 18:00:35 +00:00
mma7660.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
mma8452.c iio: mma8452: mark expected switch fall-through 2019-04-04 20:19:41 +01:00
mma9551.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
mma9551_core.c iio: accel: mma9553: fix alignment issues 2015-06-14 16:00:54 +01:00
mma9551_core.h iio: accel: mma9553: fix alignment issues 2015-06-14 16:00:54 +01:00
mma9553.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
mxc4005.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
mxc6255.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
sca3000.c iio: sca3000: Fix missing return in switch 2018-07-24 18:17:18 +01:00
ssp_accel_sensor.c iio: common: ssp_sensors: accel: use devm_iio_device_register() 2017-01-28 12:15:22 +00:00
st_accel.h iio: st-accel: add support for lis3de 2018-11-16 18:32:30 +00:00
st_accel_buffer.c iio: st_sensors: switch to a threaded interrupt 2016-05-29 20:21:41 +01:00
st_accel_core.c iio: st_accel: remove redundant unsigned less than zero check 2019-04-04 20:19:50 +01:00
st_accel_i2c.c iio: st-accel: add support for lis3de 2018-11-16 18:32:30 +00:00
st_accel_spi.c iio: st-accel: add support for lis3de 2018-11-16 18:32:30 +00:00
stk8ba50.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00
stk8312.c iio:accel: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:22:40 +01:00