[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fac9d8813374e95bcc04134a0f40f45@AcuMS.aculab.com>
Date: Thu, 1 Jul 2021 14:52:08 +0000
From: David Laight <David.Laight@...LAB.COM>
To: "'Fabio M. De Francesco'" <fmdefrancesco@...il.com>,
Larry Finger <Larry.Finger@...inger.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] staging: rtl8188eu: Replace a custom function with
crc32_le()
From: Fabio M. De Francesco
> Sent: 01 July 2021 14:38
>
> Use crc32_le in place of the custom getcrc32. This change makes GCC
> to warn about incorrect castings to the restricted type __le32, but
> they can be safely ignored because crc32_le calculates bitwise
> little-endian Ethernet AUTODIN II CRC32.
>
...
> - *((__le32 *)crc) = getcrc32(payload, length);/* modified by Amy*/
> + *((__le32 *)crc) = ~crc32_le(~0, payload, length);
Haven't we been round this before?
You need to get rid of these crappy casts.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists