OpenCloudOS-Kernel/drivers/staging/speakup
Bhumika Goyal c4610f6e1d Staging: speakup: constify attribute_group structures
Check for attribute_group structures that are only passed as a second
argument to the functions sysfs_remove_group and sysfs_create_group. As
these arguments are constant so, attribute_group structures having this
property  can also be made constant.
Done using coccinelle:

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

@ok1@
identifier r1.i;
position p;
expression e1;
@@
(
sysfs_remove_group(e1,&i@p)
|
sysfs_create_group(e1,&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
   7551	   1440	     16	   9007	   232f
drivers/staging/speakup/kobjects.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   7671	   1312	     16	   8999	   2327
drivers/staging/speakup/kobjects.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:14:03 +02:00
..
DefaultKeyAssignments
Kconfig Staging: speakup: Fix allyesconfig build on mn10300 2016-02-01 13:05:44 -08:00
Makefile
TODO
buffers.c staging: speakup: (coding style) Rewrite comparisons to NULL 2016-01-28 22:40:31 -08:00
devsynth.c Staging: speakup: Remove space after cast 2016-08-15 19:14:53 +02:00
fakekey.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
i18n.c staging: speakup: compress return logic into one line 2016-02-11 20:00:30 -08:00
i18n.h
keyhelp.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
kobjects.c Staging: speakup: constify attribute_group structures 2016-10-02 17:14:03 +02:00
main.c Staging: speakup: Clear hi font bit from attributes 2016-03-28 07:30:36 -07:00
selection.c tty: Replace TTY_THROTTLED bit tests with tty_throttled() 2016-04-30 09:26:55 -07:00
serialio.c staging: speakup: Fix block comment style 2016-02-14 16:49:09 -08:00
serialio.h staging: speakup: fix type mismatch warnings 2016-03-28 07:30:36 -07:00
speakup.h
speakup_acnt.h
speakup_acntpc.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_acntsa.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_apollo.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_audptr.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_bns.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_decext.c Staging:speakup:add space around '|' 2016-02-07 19:07:38 -08:00
speakup_decpc.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_dectlk.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_dtlk.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_dtlk.h
speakup_dummy.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_keypc.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_ltlk.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_soft.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_spkout.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakup_txprt.c Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
speakupmap.h
speakupmap.map
spk_priv.h Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
spk_priv_keyinfo.h Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
spk_types.h
spkguide.txt Staging: speakup: Remove FSF mailing address 2016-01-28 22:40:31 -08:00
synth.c staging: speakup: Remove unnecessary parentheses 2016-09-22 11:54:47 +02:00
thread.c
varhandlers.c Staging: speakup: varhandlers: Add space around the operator. 2016-09-22 11:56:54 +02:00