crypto: mediatek - remove redundant bitwise-or
authorColin Ian King <colin.king@canonical.com>
Wed, 23 Oct 2019 11:48:24 +0000 (12:48 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 1 Nov 2019 05:38:31 +0000 (13:38 +0800)
Bitwise-or'ing 0xffffffff with the u32 variable ctr is the same result
as assigning the value to ctr.  Remove the redundant bitwise-or and
just use an assignment.

Addresses-Coverity: ("Suspicious &= or |= constant expression")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/mediatek/mtk-aes.c

index 90c9644fb8a8694e90e47c32fcd662f2b8d75fd4..d43410259113850a438c6983a935f99bf0d7b23f 100644 (file)
@@ -591,7 +591,7 @@ static int mtk_aes_ctr_transfer(struct mtk_cryp *cryp, struct mtk_aes_rec *aes)
        start = ctr;
        end = start + blocks - 1;
        if (end < start) {
-               ctr |= 0xffffffff;
+               ctr = 0xffffffff;
                datalen = AES_BLOCK_SIZE * -start;
                fragmented = true;
        }