Skip to content
Commit cd0223c6 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Darren Hart (VMware)
Browse files

platform/x86: ibm_rtl: remove unnecessary static in ibm_rtl_write()

Remove unnecessary static on local variable cmd_port_val. Such variable
is initialized before being used, on every execution path throughout
the function. The static has no benefit and, removing it reduces the
object file size.

This issue was detected using Coccinelle and the following semantic patch:
https://github.com/GustavoARSilva/coccinelle/blob/master/static/static_unused.cocci



In the following log you can see a difference in the object file size.
This log is the output of the size command, before and after the code
change:

before:
   text    data     bss     dec     hex filename
   3932    3440     512    7884    1ecc drivers/platform/x86/ibm_rtl.o

after:
   text    data     bss     dec     hex filename
   3887    3384     448    7719    1e27 drivers/platform/x86/ibm_rtl.o

Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 6d8d5562
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment