[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZuQUiK8-elOhoiX0@gondor.apana.org.au>
Date: Fri, 13 Sep 2024 18:31:36 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: WangYuli <wangyuli@...ontech.com>
Cc: davem@...emloft.net, tsbogend@...ha.franken.de,
linux-crypto@...r.kernel.org, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Maciej W . Rozycki" <macro@...am.me.uk>,
Guan Wentao <guanwentao@...ontech.com>
Subject: Re: [PATCH v3] MIPS: crypto: Clean up useless assignment operations
On Fri, Sep 06, 2024 at 02:40:02PM +0800, WangYuli wrote:
> When entering the "len & sizeof(u32)" branch, len must be less than 8.
> So after one operation, len must be less than 4.
> At this time, "len -= sizeof(u32)" is not necessary for 64-bit CPUs.
>
> After that, replace `while' loops with equivalent `for' to make the
> code structure a little bit better by the way.
>
> Suggested-by: Maciej W. Rozycki <macro@...am.me.uk>
> Link: https://lore.kernel.org/all/alpine.DEB.2.21.2406281713040.43454@angie.orcam.me.uk/
> Suggested-by: Herbert Xu <herbert@...dor.apana.org.au>
> Link: https://lore.kernel.org/all/ZtqZpzMH_qMQqzyc@gondor.apana.org.au/
> Signed-off-by: Guan Wentao <guanwentao@...ontech.com>
> Signed-off-by: WangYuli <wangyuli@...ontech.com>
> ---
> arch/mips/crypto/crc32-mips.c | 70 ++++++++++++++++++-----------------
> 1 file changed, 37 insertions(+), 33 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists