[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2058378.BL2Rai63ie@linux.local>
Date: Thu, 01 Jul 2021 17:23:38 +0200
From: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To: 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>,
David Laight <David.Laight@...lab.com>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] staging: rtl8188eu: Replace a custom function with crc32_le()
On Thursday, July 1, 2021 4:52:08 PM CEST David Laight wrote:
> 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?
>
No, I don't think so. At least, not you and I.
Unfortunately, I don't get paid to read every conversation sent to the Linux
related mailing lists.
However, since you pointed out that somewhere, in an unspecified time, this
topic had already been discussed I've just found an email of yours: https://
lore.kernel.org/lkml/bdc0c31a7d28426995d229eb9014cd2b@...MS.aculab.com/
I think that there you are talking of something else.
Perhaps, in the same thread there's an email from Al Viro that seems to be
more pertinent: https://lore.kernel.org/lkml/YMz0DH0+v39xsCYU@zeniv-ca.linux.org.uk/
In particular, Al Viro writes "[...] Either make crc __le32 (and turn
assignment into crc = cpu_to_le32(...)), or
make that *(__le32 *)crc = ...".
> You need to get rid of these crappy casts.
So, what am I missing?
Thanks,
Fabio
>
> David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1
1PT, UK
> Registration No: 1397386 (Wales)
Powered by blists - more mailing lists