linux/drivers/staging/rtl8192e
Bhumika Goyal 67f9dcb155 Staging: rtl8192e: rtl_core: Constify rtllib_qos_parameters structures
Declare the structure rtllib_qos_parameters as constant as it is only
passed as the second argument to the function memcpy. This argument
is constant so the fields of rtllib_qos_parameters structure are
never modified and hence it can be declared as const.
Done using coccinelle:

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

@ok1@
identifier r1.i;
position p;
expression e1,e2;
@@
memcpy(e1,&i@p,e2)

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

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

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

File size before:
   text	   data	    bss	    dec	    hex	filename
  30910	    496	    201	  31607	   7b77
drivers/staging/rtl8192e/rtl8192e/rtl_core.o

File size after:
   text	   data	    bss	    dec	    hex	filename
  30942	    464	    201	  31607	   7b77
drivers/staging/rtl8192e/rtl8192e/rtl_core.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:24:51 +02:00
..
rtl8192e Staging: rtl8192e: rtl_core: Constify rtllib_qos_parameters structures 2016-10-16 10:24:51 +02:00
dot11d.c staging: rtl8192e: Remove unnecessary blank lines 2016-09-20 13:36:57 +02:00
dot11d.h staging: rtl8192e: Insert blank line after function declaration 2016-09-20 13:36:57 +02:00
Kconfig
license
Makefile
rtl819x_BA.h staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings 2015-09-29 04:26:06 +02:00
rtl819x_BAProc.c staging: rtl8192e: Drop useless initialisation 2016-02-20 15:12:06 -08:00
rtl819x_HT.h staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings 2015-09-29 04:26:06 +02:00
rtl819x_HTProc.c staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings 2015-09-29 04:26:06 +02:00
rtl819x_Qos.h staging/rtl8192e: avoid comparing unsigned type >= 0 2016-08-21 18:21:28 +02:00
rtl819x_TS.h staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings 2015-09-29 04:26:06 +02:00
rtl819x_TSProc.c staging/rtl8192e: avoid comparing unsigned type >= 0 2016-08-21 18:21:28 +02:00
rtllib_crypt_ccmp.c staging: rtl8192e: Prefer using macro DIV_ROUND_UP 2016-03-11 22:09:09 -08:00
rtllib_crypt_tkip.c Staging driver patches for 4.6-rc1 2016-03-17 22:13:41 -07:00
rtllib_crypt_wep.c staging: rtl8192e: Replace uses of obsolete blkcipher and hash 2016-01-27 20:35:46 +08:00
rtllib_debug.h staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings 2015-09-29 04:26:06 +02:00
rtllib_module.c Staging: rtl8192e: Use !x instead of x == NULL 2016-09-18 12:37:43 +02:00
rtllib_rx.c drivers: staging: rtl8192e: rtllib_rx.c: Fix blank lines before a close brace 2016-03-11 22:09:09 -08:00
rtllib_softmac_wx.c rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex 2016-08-21 18:22:31 +02:00
rtllib_softmac.c Staging: rtl8192e: mark symbols static where possible 2016-09-12 12:29:27 +02:00
rtllib_tx.c staging: rtl8192e: fixed use a blank line after function/struct/union/enum declarations 2016-09-28 11:39:10 +02:00
rtllib_wx.c rtl8192e: rtllib_device: Replace semaphore wx_sem with mutex 2016-08-21 18:22:31 +02:00
rtllib.h staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants 2016-10-02 17:26:57 +02:00
TODO