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@xxxxxxxxxxx> > Link: https://lore.kernel.org/all/alpine.DEB.2.21.2406281713040.43454@xxxxxxxxxxxxxxxxx/ > Suggested-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > Link: https://lore.kernel.org/all/ZtqZpzMH_qMQqzyc@xxxxxxxxxxxxxxxxxxx/ > Signed-off-by: Guan Wentao <guanwentao@xxxxxxxxxxxxx> > Signed-off-by: WangYuli <wangyuli@xxxxxxxxxxxxx> > --- > arch/mips/crypto/crc32-mips.c | 70 ++++++++++++++++++----------------- > 1 file changed, 37 insertions(+), 33 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt