crypto: mediatek - Fix endianness bugs and sparse warnings
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Aug 2020 07:52:04 +0000 (17:52 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 28 Aug 2020 06:58:30 +0000 (16:58 +1000)
commit39340cf97fef32667e8714d0fcc247f02d8e2b97
treec2891846d184b247c6d43cd6fa8e7963c3f05341
parent9fae1f05b849221d109ce669b054d03b3257f5c4
crypto: mediatek - Fix endianness bugs and sparse warnings

This patch squashes all the sparse warnings in mediatek, some of
which appear to be genuine bugs.  In particular, previously on
BE the keys and IVs all get 32-bit swabbed which can't be right
because they don't get swabbed on LE.  I presume LE is the one
that actually works.

Another funky thing is that the GHASH key gets swabbed on LE.
This makes no sense but I'm presuming someone actually tested
this on LE so I'm preserving the swabbing.  Someone needs to
test this though as it is entirely possible that GCM is the
only thing that worked on BE but not LE.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mediatek/mtk-aes.c
drivers/crypto/mediatek/mtk-sha.c