From: Fabio M. De Francesco Date: Fri, 30 Jul 2021 10:37:16 +0000 (+0200) Subject: staging: r8188eu: Remove no more used functions and variables X-Git-Tag: v5.15~425^2~326 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=792a00c16597415e8058c1f4ff8226866e8accf8;p=platform%2Fkernel%2Flinux-starfive.git staging: r8188eu: Remove no more used functions and variables Remove the functions and variables from rtw_security.c that are no more necessary since the patch that replaces getcrc32() with crc32_le(). Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210730103716.27210-3-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c index 9625bee..136ba1e 100644 --- a/drivers/staging/r8188eu/core/rtw_security.c +++ b/drivers/staging/r8188eu/core/rtw_security.c @@ -74,43 +74,6 @@ static void arcfour_encrypt(struct arc4context *parc4ctx, u8 *dest, u8 *src, u32 } -static int bcrc32initialized; -static u32 crc32_table[256]; - -static u8 crc32_reverseBit(u8 data) -{ - return (u8)((data<<7)&0x80) | ((data<<5)&0x40) | ((data<<3)&0x20) | - ((data<<1)&0x10) | ((data>>1)&0x08) | ((data>>3)&0x04) | - ((data>>5)&0x02) | ((data>>7)&0x01); -} - -static void crc32_init(void) -{ - if (bcrc32initialized == 1) { - return; - } else { - int i, j; - u32 c; - u8 *p = (u8 *)&c, *p1; - u8 k; - - c = 0x12340000; - - for (i = 0; i < 256; ++i) { - k = crc32_reverseBit((u8)i); - for (c = ((u32)k) << 24, j = 8; j > 0; --j) - c = c & 0x80000000 ? (c << 1) ^ CRC32_POLY : (c << 1); - p1 = (u8 *)&crc32_table[i]; - - p1[0] = crc32_reverseBit(p[3]); - p1[1] = crc32_reverseBit(p[2]); - p1[2] = crc32_reverseBit(p[1]); - p1[3] = crc32_reverseBit(p[0]); - } - bcrc32initialized = 1; - } -} - /* Need to consider the fragment situation */