summaryrefslogtreecommitdiffstats
path: root/drivers/char/snsc.h
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-01-15 20:15:00 +0100
committerCorey Minyard <cminyard@mvista.com>2017-02-09 16:10:56 +0100
commitdb3b7e134185b27e6073618c1ad7eca1e4473eb4 (patch)
treef123d9a21f1a1f17f0cef66001cabfbee9e1a06b /drivers/char/snsc.h
parentacpi:ipmi: Make IPMI user handler const (diff)
downloadlinux-db3b7e134185b27e6073618c1ad7eca1e4473eb4.tar.xz
linux-db3b7e134185b27e6073618c1ad7eca1e4473eb4.zip
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>
Diffstat (limited to 'drivers/char/snsc.h')
0 files changed, 0 insertions, 0 deletions