rtw88: 8822[bc]: Make tables const, reduce data object size
authorJoe Perches <joe@perches.com>
Thu, 6 Feb 2020 10:54:38 +0000 (02:54 -0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 12 Feb 2020 16:22:33 +0000 (18:22 +0200)
commitd49f2c5063fdd00f896e408a1c1fa63e6d94a767
tree9773a79401d589b0e91e0936b35e1e9d7e7e90a6
parent74c3d72cc13401f9eb3e3c712855e9f8f2d2682b
rtw88: 8822[bc]: Make tables const, reduce data object size

Reduce the data size 2kb or 3kb by making tables const.
Add const to pointer declarations to make compilation work too.

(x86-64 defconfig)
$ size drivers/net/wireless/realtek/rtw88/rtw8822?.o*
   text    data     bss     dec     hex filename
  25054     672       8   25734    6486 drivers/net/wireless/realtek/rtw88/rtw8822b.o.new
  23870    1872       8   25750    6496 drivers/net/wireless/realtek/rtw88/rtw8822b.o.old
  53646     828       0   54474    d4ca drivers/net/wireless/realtek/rtw88/rtw8822c.o.new
  52846    1652       0   54498    d4e2 drivers/net/wireless/realtek/rtw88/rtw8822c.o.old

(x86-64 allyesconfig)
$ size drivers/net/wireless/realtek/rtw88/rtw8822?.o*
   text    data     bss     dec     hex filename
  45811    6280     128   52219    cbfb drivers/net/wireless/realtek/rtw88/rtw8822b.o.new
  44211    7880     128   52219    cbfb drivers/net/wireless/realtek/rtw88/rtw8822b.o.old
 100195    8128       0  108323   1a723 drivers/net/wireless/realtek/rtw88/rtw8822c.o.new
  98947    9376       0  108323   1a723 drivers/net/wireless/realtek/rtw88/rtw8822c.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtw88/mac.c
drivers/net/wireless/realtek/rtw88/main.h
drivers/net/wireless/realtek/rtw88/pci.c
drivers/net/wireless/realtek/rtw88/rtw8822b.c
drivers/net/wireless/realtek/rtw88/rtw8822c.c