aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorGargi Sharma <[email protected]>2017-03-02 22:27:15 +0530
committerGreg Kroah-Hartman <[email protected]>2017-03-07 19:56:08 +0100
commitfb1c3256477207846ad0e626dc8adf173c1ba376 (patch)
treee7ff129d1780214c5ebed5e6593bf031a03e84db /tools/perf/scripts/python/bin
parentfd535ae7847513b89c50c7fe485c101a51fa6d23 (diff)
staging: lustre: lnet: Constify kernel_param_ops structure
The structure is used as an argument to module_param macro. This macro calls a bunch of other macros and finally assigns the instance of the kernel_param_ops structure to the const struct kernel_param_ops* field of a variable of type kernel_param. Hence, const can be added to the structure. Coccinelle Script: @r disable optional_qualifier@ identifier i; position p; @@ static struct kernel_param_ops i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @script:python s@ i << r.i; t; @@ coccinelle.t = i[10:]; @ok2@ declarer name module_param; expression e1,e2; position p; @@ module_param(e1,s.t@p,e2); @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct kernel_param_ops i = { ... }; Signed-off-by: Gargi Sharma <[email protected]> Reviewed-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions