linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: Remove no more used functions and variables
@ 2021-07-01 16:41 Fabio M. De Francesco
  2021-07-21  8:18 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio M. De Francesco @ 2021-07-01 16:41 UTC (permalink / raw)
  To: Larry Finger, Greg Kroah-Hartman, linux-staging, linux-kernel
  Cc: Fabio M. De Francesco

Remove the functions and variables from rtw_security.c that are no more
necessary since the patch that replaces getcrc32() with crc32_le():
https://lore.kernel.org/lkml/20210701133809.26534-1-fmdefrancesco@gmail.com/

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---

Please, apply after the above-mentioned patch to make the code build
with no errors.

 drivers/staging/rtl8188eu/core/rtw_security.c | 36 -------------------
 1 file changed, 36 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c
index 5f010cb66970..ce2d31287ee2 100644
--- a/drivers/staging/rtl8188eu/core/rtw_security.c
+++ b/drivers/staging/rtl8188eu/core/rtw_security.c
@@ -75,42 +75,6 @@ static void arcfour_encrypt(struct arc4context *parc4ctx, u8 *dest, u8 *src, u32
 		dest[i] = src[i] ^ (unsigned char)arcfour_byte(parc4ctx);
 }
 
-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)
-{
-	int i, j;
-	u32 c;
-	u8 *p = (u8 *)&c, *p1;
-	u8 k;
-
-	if (bcrc32initialized == 1)
-		return;
-
-	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 */
 void rtw_wep_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
 {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8188eu: Remove no more used functions and variables
  2021-07-01 16:41 [PATCH] staging: rtl8188eu: Remove no more used functions and variables Fabio M. De Francesco
@ 2021-07-21  8:18 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-21  8:18 UTC (permalink / raw)
  To: Fabio M. De Francesco; +Cc: Larry Finger, linux-staging, linux-kernel

On Thu, Jul 01, 2021 at 06:41:15PM +0200, Fabio M. De Francesco wrote:
> Remove the functions and variables from rtw_security.c that are no more
> necessary since the patch that replaces getcrc32() with crc32_le():
> https://lore.kernel.org/lkml/20210701133809.26534-1-fmdefrancesco@gmail.com/
> 
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
> 
> Please, apply after the above-mentioned patch to make the code build
> with no errors.

Does not apply to my tree :(

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-21  8:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 16:41 [PATCH] staging: rtl8188eu: Remove no more used functions and variables Fabio M. De Francesco
2021-07-21  8:18 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).