mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 09:06:51 +07:00
7504dfc9e9
Check for iio_info structures that are only stored in the info field of a iio_dev structure. This field is declared const, so iio_info structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct iio_info i@p = { ... }; @ok@ identifier r.i; struct iio_dev e; position p; @@ e.info = &i@p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct iio_info e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct iio_info i = { ... }; // </smpl> The result of size on this file before the change is: text data bss dec hex filename 1265 344 0 1609 649 drivers/iio/accel/ssp_accel_sensor.o and after the change it is: text data bss dec hex filename 1425 192 0 1617 651 drivers/iio/accel/ssp_accel_sensor.o Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
---|---|---|
.. | ||
bma180.c | ||
bma220_spi.c | ||
bmc150-accel-core.c | ||
bmc150-accel-i2c.c | ||
bmc150-accel-spi.c | ||
bmc150-accel.h | ||
dmard06.c | ||
dmard09.c | ||
hid-sensor-accel-3d.c | ||
Kconfig | ||
kxcjk-1013.c | ||
kxsd9-i2c.c | ||
kxsd9-spi.c | ||
kxsd9.c | ||
kxsd9.h | ||
Makefile | ||
mma7455_core.c | ||
mma7455_i2c.c | ||
mma7455_spi.c | ||
mma7455.h | ||
mma7660.c | ||
mma8452.c | ||
mma9551_core.c | ||
mma9551_core.h | ||
mma9551.c | ||
mma9553.c | ||
mxc4005.c | ||
mxc6255.c | ||
ssp_accel_sensor.c | ||
st_accel_buffer.c | ||
st_accel_core.c | ||
st_accel_i2c.c | ||
st_accel_spi.c | ||
st_accel.h | ||
stk8ba50.c | ||
stk8312.c |