Re: [PATCH] crypto: atmel - fix data types for __be{32,64}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 16, 2019 at 01:26:33PM +0100, Ben Dooks (Codethink) wrote:
> The driver uses a couple of buffers that seem to
> be __be32 or __be64 fields, but declares them as
> u32. This means there are a number of warnings
> from sparse due to casting to/from __beXXX.
> 
> Fix these by changing the types of the buffer
> and the associated variables.
> 
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1023:15: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1059:28: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1059:28:    expected unsigned int
> drivers/crypto/atmel-aes.c:1059:28:    got restricted __be32 [usertype]
> drivers/crypto/atmel-aes.c:1550:28: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1550:28:    expected unsigned int
> drivers/crypto/atmel-aes.c:1550:28:    got restricted __be32 [usertype]
> drivers/crypto/atmel-aes.c:1561:39: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1561:39:    expected unsigned long long [usertype]
> drivers/crypto/atmel-aes.c:1561:39:    got restricted __be64 [usertype]
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:17: warning: cast to restricted __be32
> drivers/crypto/atmel-aes.c:1599:15: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1599:15:    expected unsigned int [usertype]
> drivers/crypto/atmel-aes.c:1599:15:    got restricted __be32 [usertype]
> drivers/crypto/atmel-aes.c:1692:17: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1692:17:    expected unsigned long long [usertype]
> drivers/crypto/atmel-aes.c:1692:17:    got restricted __be64 [usertype]
> drivers/crypto/atmel-aes.c:1693:17: warning: incorrect type in assignment (different base types)
> drivers/crypto/atmel-aes.c:1693:17:    expected unsigned long long [usertype]
> drivers/crypto/atmel-aes.c:1693:17:    got restricted __be64 [usertype]
> drivers/crypto/atmel-aes.c:1888:63: warning: incorrect type in initializer (different base types)
> drivers/crypto/atmel-aes.c:1888:63:    expected unsigned int
> drivers/crypto/atmel-aes.c:1888:63:    got restricted __le32 [usertype]
> 
> Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
> ---
> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>
> Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
> Cc: Ludovic Desroches <ludovic.desroches@xxxxxxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> .. (open list)
> ---
>  drivers/crypto/atmel-aes.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux