[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMX7SRSPgvMA/Pw1@kroah.com>
Date: Sun, 13 Jun 2021 14:34:17 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Jhih-Ming Huang <fbihjmeric@...il.com>
Cc: fabioaiuto83@...il.com, ross.schm.dev@...il.com,
maqianga@...ontech.com, marcocesati@...il.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] rtw_security: fix cast to restricted __le32
On Sun, Jun 13, 2021 at 08:28:58PM +0800, Jhih-Ming Huang wrote:
> This patch fixes the sparse warning of fix cast to restricted __le32.
>
> Last month, there was a change for replacing private CRC-32 routines with
> in-kernel ones.
> In that patch, we replaced getcrc32 with crc32_le in calling le32_to_cpu.
> le32_to_cpu accepts __le32 type as arg, but crc32_le returns unsigned int.
> That how it introduced the sparse warning.
As crc32_le returns a u32 which is in native-endian format, how can you
cast it to le32? Why do you cast it to le32? Isn't that going to be
incorrect for big endian systems?
thanks,
greg k-h
Powered by blists - more mailing lists