aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorGustavo A. R. Silva <[email protected]>2017-07-05 14:07:29 -0400
committerMauro Carvalho Chehab <[email protected]>2017-07-26 08:37:30 -0400
commit281643a2ad7a82ee6588f5f95b6153bb38e6640c (patch)
treed9c124b85d887dc34dc2212234b8983ac3b958a0 /tools/perf/scripts/python/bin/stackcollapse-record
parent80cdacaa5cad7e0550789a47bcd108f32a7fc9f1 (diff)
media: s5k5baf: remove unnecessary static in s5k5baf_get_selection()
Remove unnecessary static on local variable rtype. Such variable is initialized before being used, on every execution path throughout the function. The static has no benefit and, removing it reduces the code size. This issue was detected using Coccinelle and the following semantic patch: @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; In the following log you can see the difference in the code size. Also, there is a significant difference in the bss segment. This log is the output of the size command, before and after the code change: before: text data bss dec hex filename 27765 5656 320 33741 83cd drivers/media/i2c/s5k5baf.o after: text data bss dec hex filename 27733 5600 256 33589 8335 drivers/media/i2c/s5k5baf.o Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions