linux-sg2042/drivers/char/ipmi
Bhumika Goyal db3b7e1341 char: ipmi: constify ipmi_smi_handlers structures
Declare ipmi_smi_handlers structures as const as they are only passed as
an argument to the function ipmi_register_smi. This argument is of type
const, so ipmi_smi_handlers structures having similar properties can be
declared const too.
Done using Coccinelle:

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

@ok1@
identifier r1.i;
position p;
@@
ipmi_register_smi(&i@p,...)

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

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

Size details after cross compiling the .o file for powerpc architecture

File size before:
  text	   data	    bss	    dec	    hex	filename
  2777	    288	      0	   3065	    bf9	drivers/char/ipmi/ipmi_powernv.o

File size after:
  text	   data	    bss	    dec	    hex	filename
   2873	    192	      0	   3065	    bf9	drivers/char/ipmi/ipmi_powernv.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2017-02-09 09:10:56 -06:00
..
Kconfig ipmi/bt-bmc: add a dependency on ARCH_ASPEED 2016-09-29 19:05:06 -05:00
Makefile ipmi: add an Aspeed BT IPMI BMC driver 2016-09-29 19:05:06 -05:00
bt-bmc.c ipmi/bt-bmc: change compatible node to 'aspeed, ast2400-ibt-bmc' 2016-11-17 16:31:09 -08:00
ipmi_bt_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_devintf.c ipmi: make ipmi_usr_hndl const 2017-01-05 15:01:55 -06:00
ipmi_kcs_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_msghandler.c ipmi: make ipmi_usr_hndl const 2017-01-05 15:01:55 -06:00
ipmi_powernv.c char: ipmi: constify ipmi_smi_handlers structures 2017-02-09 09:10:56 -06:00
ipmi_poweroff.c char: Convert use of typedef ctl_table to struct ctl_table 2013-06-17 16:43:08 -07:00
ipmi_si_intf.c ipmi: Pick up slave address from SMBIOS on an ACPI device 2016-11-24 18:09:48 -06:00
ipmi_si_sm.h ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_smic_sm.c ipmi: Make some data const that was only read 2015-09-03 15:02:27 -05:00
ipmi_ssif.c ipmi: Pick up slave address from SMBIOS on an ACPI device 2016-11-24 18:09:48 -06:00
ipmi_watchdog.c ipmi: make ipmi_usr_hndl const 2017-01-05 15:01:55 -06:00