summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2016-10-04 20:52:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-16 11:24:51 +0300
commit67f9dcb155875864ccaf74625a7c702e6d07ab31 (patch)
treea1f3878e93912eedd261b5359be36bfafa2a3270 /include/linux
parent9ab9d4529a612fde4f196d445b7547dd6d6a64ed (diff)
downloadlinux-67f9dcb155875864ccaf74625a7c702e6d07ab31.tar.xz
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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions