forked from Minki/linux
67f9dcb155
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> |
||
---|---|---|
.. | ||
rtl8192e | ||
dot11d.c | ||
dot11d.h | ||
Kconfig | ||
license | ||
Makefile | ||
rtl819x_BA.h | ||
rtl819x_BAProc.c | ||
rtl819x_HT.h | ||
rtl819x_HTProc.c | ||
rtl819x_Qos.h | ||
rtl819x_TS.h | ||
rtl819x_TSProc.c | ||
rtllib_crypt_ccmp.c | ||
rtllib_crypt_tkip.c | ||
rtllib_crypt_wep.c | ||
rtllib_debug.h | ||
rtllib_module.c | ||
rtllib_rx.c | ||
rtllib_softmac_wx.c | ||
rtllib_softmac.c | ||
rtllib_tx.c | ||
rtllib_wx.c | ||
rtllib.h | ||
TODO |