]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: rtl8821ae: make array static const and remove redundant assignment
authorColin Ian King <colin.king@canonical.com>
Thu, 5 Sep 2019 15:00:22 +0000 (16:00 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 13 Sep 2019 13:44:18 +0000 (16:44 +0300)
commit3b11e53dcf1f22e3a6c13e6ea81fce3c1ad11c3d
tree5e6d9e764efbe96f0b85fcd5755894fda4a2cf36
parent9bfefa0e1f89a2e94d007ecee0166ec60ab8e4ff
rtlwifi: rtl8821ae: make array static const and remove redundant assignment

The array channel_all can be make static const rather than populating
it on the stack, this makes the code smaller.  Also, variable place
is being initialized with a value that is never read, so this assignment
is redundant and can be removed.

Before:
   text    data     bss     dec     hex filename
 118537    9591       0  128128   1f480 realtek/rtlwifi/rtl8821ae/phy.o

After:
   text    data     bss     dec     hex filename
 118331    9687       0  128018   1f412 realtek/rtlwifi/rtl8821ae/phy.o

Saves 110 bytes, (gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c