linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: r8188eu: Remove no more used functions and variables
Date: Fri, 30 Jul 2021 13:51:39 -0500	[thread overview]
Message-ID: <2daf2287-e019-3be3-6627-b698bee6246b@lwfinger.net> (raw)
In-Reply-To: <20210730103716.27210-3-fmdefrancesco@gmail.com>

On 7/30/21 5:37 AM, 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().
> 
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
>   drivers/staging/r8188eu/core/rtw_security.c | 37 ---------------------
>   1 file changed, 37 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_security.c b/drivers/staging/r8188eu/core/rtw_security.c
> index 9625beea4b3c..136ba1e61dca 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
>   */
> 

These two patches are

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks for your contribution.

Larry


      reply	other threads:[~2021-07-30 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 10:37 [PATCH 0/2] staging: r8188eu: Use in-kernel API and remove no more needed symbols Fabio M. De Francesco
2021-07-30 10:37 ` [PATCH 1/2] staging: r8188eu: Replace a custom function with crc32_le() Fabio M. De Francesco
2021-07-30 10:37 ` [PATCH 2/2] staging: r8188eu: Remove no more used functions and variables Fabio M. De Francesco
2021-07-30 18:51   ` Larry Finger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2daf2287-e019-3be3-6627-b698bee6246b@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --subject='Re: [PATCH 2/2] staging: r8188eu: Remove no more used functions and variables' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).