crypto: sun4i-ss - fix a few signed warning
authorCorentin LABBE <clabbe.montjoie@gmail.com>
Wed, 10 Aug 2016 09:45:29 +0000 (11:45 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 16 Aug 2016 09:16:54 +0000 (17:16 +0800)
The variable i is always checked against unsigned value and cannot be
negative.
This patch set it as unsigned.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sunxi-ss/sun4i-ss-cipher.c

index 3830d7c..90efd10 100644 (file)
@@ -29,7 +29,8 @@ static int sun4i_ss_opti_poll(struct ablkcipher_request *areq)
        u32 tx_cnt = 0;
        u32 spaces;
        u32 v;
-       int i, err = 0;
+       int err = 0;
+       unsigned int i;
        unsigned int ileft = areq->nbytes;
        unsigned int oleft = areq->nbytes;
        unsigned int todo;
@@ -139,7 +140,8 @@ static int sun4i_ss_cipher_poll(struct ablkcipher_request *areq)
        u32 tx_cnt = 0;
        u32 v;
        u32 spaces;
-       int i, err = 0;
+       int err = 0;
+       unsigned int i;
        unsigned int ileft = areq->nbytes;
        unsigned int oleft = areq->nbytes;
        unsigned int todo;