linux_dsm_epyc7002/drivers/iio/humidity
simran singhal 757cff86a8 iio: humidity: hdc100x: constify attribute_group structures
Check for attribute_group structures that are only stored in the
attrs filed of iio_info structure. As the attrs field of iio_info
structures is constant, so these attribute_group structures can also be
declared constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
struct iio_info x;
@@
x.attrs=&i@p;

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
   text	   data	    bss	    dec	    hex	filename
   3459	    488	      0	   3947	    f6b	drivers/iio/humidity/hdc100x.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   3507	    424	      0	   3931	    f5b	drivers/iio/humidity/hdc100x.o

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-04-01 11:37:06 +01:00
..
am2315.c iio: humidity: am2315: set up buffer timestamps for non-zero values 2016-08-15 15:39:23 +01:00
dht11.c iio: dht11: Use usleep_range instead of msleep for start signal 2017-01-22 13:35:40 +00:00
hdc100x.c iio: humidity: hdc100x: constify attribute_group structures 2017-04-01 11:37:06 +01:00
hid-sensor-humidity.c iio: hid: Add humidity sensor support 2017-03-25 16:32:24 +00:00
hts221_buffer.c iio: humidity: remove duplicated include from hts221_buffer.c 2016-11-01 18:43:46 +00:00
hts221_core.c iio: humidity: add support to hts221 rh/temp combo device 2016-10-23 19:34:09 +01:00
hts221_i2c.c iio: humidity: Support acpi probe for hts211 2016-12-03 08:56:28 +00:00
hts221_spi.c iio: humidity: add support to hts221 rh/temp combo device 2016-10-23 19:34:09 +01:00
hts221.h iio: humidity: add support to hts221 rh/temp combo device 2016-10-23 19:34:09 +01:00
htu21.c iio: Export I2C module alias information 2016-05-21 20:08:14 +01:00
Kconfig iio: hid: Add humidity sensor support 2017-03-25 16:32:24 +00:00
Makefile iio: hid: Add humidity sensor support 2017-03-25 16:32:24 +00:00
si7005.c iio: convert to common i2c_check_functionality() return value 2016-02-27 17:17:43 +00:00
si7020.c iio: si7020: Add devicetree support and trivial bindings 2016-11-01 18:49:53 +00:00