* crypto: ixp4xx - Fix sparse warnings
@ 2022-09-30 6:09 Herbert Xu
2022-10-03 11:18 ` Corentin Labbe
2022-10-03 12:14 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Herbert Xu @ 2022-09-30 6:09 UTC (permalink / raw)
To: Linux Crypto Mailing List, Linus Walleij, Imre Kaloz, Krzysztof Halasa
This fixes a number of trivial sparse warnings in ixp4xx.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index c2845857e3dd..8459a2c78423 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -421,7 +421,7 @@ static void one_packet(dma_addr_t phys)
break;
case CTL_FLAG_GEN_REVAES:
ctx = crypto_tfm_ctx(crypt->data.tfm);
- *(u32 *)ctx->decrypt.npe_ctx &= cpu_to_be32(~CIPH_ENCR);
+ *(__be32 *)ctx->decrypt.npe_ctx &= cpu_to_be32(~CIPH_ENCR);
if (atomic_dec_and_test(&ctx->configuring))
complete(&ctx->completion);
break;
@@ -721,7 +721,7 @@ static int register_chain_var(struct crypto_tfm *tfm, u8 xpad, u32 target,
crypt->init_len = init_len;
crypt->ctl_flags |= CTL_FLAG_GEN_ICV;
- buf->next = 0;
+ buf->next = NULL;
buf->buf_len = HMAC_PAD_BLOCKLEN;
buf->pkt_len = 0;
buf->phys_addr = pad_phys;
@@ -752,7 +752,7 @@ static int setup_auth(struct crypto_tfm *tfm, int encrypt, unsigned int authsize
#ifndef __ARMEB__
cfgword ^= 0xAA000000; /* change the "byte swap" flags */
#endif
- *(u32 *)cinfo = cpu_to_be32(cfgword);
+ *(__be32 *)cinfo = cpu_to_be32(cfgword);
cinfo += sizeof(cfgword);
/* write ICV to cryptinfo */
@@ -789,7 +789,7 @@ static int gen_rev_aes_key(struct crypto_tfm *tfm)
if (!crypt)
return -EAGAIN;
- *(u32 *)dir->npe_ctx |= cpu_to_be32(CIPH_ENCR);
+ *(__be32 *)dir->npe_ctx |= cpu_to_be32(CIPH_ENCR);
crypt->data.tfm = tfm;
crypt->crypt_offs = 0;
@@ -847,7 +847,7 @@ static int setup_cipher(struct crypto_tfm *tfm, int encrypt, const u8 *key,
return err;
}
/* write cfg word to cryptinfo */
- *(u32 *)cinfo = cpu_to_be32(cipher_cfg);
+ *(__be32 *)cinfo = cpu_to_be32(cipher_cfg);
cinfo += sizeof(cipher_cfg);
/* write cipher key to cryptinfo */
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: crypto: ixp4xx - Fix sparse warnings
2022-09-30 6:09 crypto: ixp4xx - Fix sparse warnings Herbert Xu
@ 2022-10-03 11:18 ` Corentin Labbe
2022-10-03 12:14 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Corentin Labbe @ 2022-10-03 11:18 UTC (permalink / raw)
To: Herbert Xu
Cc: Linux Crypto Mailing List, Linus Walleij, Imre Kaloz, Krzysztof Halasa
Le Fri, Sep 30, 2022 at 02:09:34PM +0800, Herbert Xu a écrit :
> This fixes a number of trivial sparse warnings in ixp4xx.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
Hello
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-on: intel-ixp42x-welltech-epbx100
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: crypto: ixp4xx - Fix sparse warnings
2022-09-30 6:09 crypto: ixp4xx - Fix sparse warnings Herbert Xu
2022-10-03 11:18 ` Corentin Labbe
@ 2022-10-03 12:14 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2022-10-03 12:14 UTC (permalink / raw)
To: Herbert Xu
Cc: Linux Crypto Mailing List, Linus Walleij, Imre Kaloz, Krzysztof Halasa
On Fri, Sep 30, 2022 at 8:09 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> This fixes a number of trivial sparse warnings in ixp4xx.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Looks good to me!
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-03 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30 6:09 crypto: ixp4xx - Fix sparse warnings Herbert Xu
2022-10-03 11:18 ` Corentin Labbe
2022-10-03 12:14 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).