Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl*/security: Use static const in array declarations

Use static const in declarations where appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Link: https://lore.kernel.org/r/818bbd25924f0c733a4a39d426fd30392d4eae80.camel@perches.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Joe Perches and committed by
Greg Kroah-Hartman
6cf26021 4eab532d

+6 -6
+2 -2
drivers/staging/rtl8188eu/core/rtw_security.c
··· 734 734 /******** SBOX Table *********/ 735 735 /*****************************/ 736 736 737 - static u8 sbox_table[256] = { 737 + static const u8 sbox_table[256] = { 738 738 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 739 739 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 740 740 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, ··· 817 817 { 818 818 u8 rcon; 819 819 u8 sbox_key[4]; 820 - u8 rcon_table[12] = { 820 + static const u8 rcon_table[12] = { 821 821 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 822 822 0x1b, 0x36, 0x36, 0x36 823 823 };
+1 -1
drivers/staging/rtl8712/rtl871x_security.c
··· 762 762 { 763 763 u8 rcon; 764 764 u8 sbox_key[4]; 765 - u8 rcon_table[12] = { 765 + static const u8 rcon_table[12] = { 766 766 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 767 767 0x1b, 0x36, 0x36, 0x36 768 768 };
+3 -3
drivers/staging/rtl8723bs/core/rtw_security.c
··· 10 10 #include <drv_types.h> 11 11 #include <rtw_debug.h> 12 12 13 - static const char *_security_type_str[] = { 13 + static const char * const _security_type_str[] = { 14 14 "N/A", 15 15 "WEP40", 16 16 "TKIP", ··· 842 842 /******** SBOX Table *********/ 843 843 /*****************************/ 844 844 845 - static u8 sbox_table[256] = { 845 + static const u8 sbox_table[256] = { 846 846 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 847 847 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 848 848 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, ··· 957 957 { 958 958 u8 rcon; 959 959 u8 sbox_key[4]; 960 - u8 rcon_table[12] = { 960 + static const u8 rcon_table[12] = { 961 961 0x01, 0x02, 0x04, 0x08, 962 962 0x10, 0x20, 0x40, 0x80, 963 963 0x1b, 0x36, 0x36, 0x36