crypto: algif - fix warn: unsigned 'used' is never less than zero
authortadeusz.struk@intel.com <tadeusz.struk@intel.com>
Wed, 25 Mar 2015 14:29:19 +0000 (07:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Mar 2015 15:44:18 +0000 (11:44 -0400)
Change type from unsigned long to int to fix an issue reported by kbuild robot:
crypto/algif_skcipher.c:596 skcipher_recvmsg_async() warn: unsigned 'used' is
never less than zero.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
crypto/algif_skcipher.c

index 8276f21ea7beac7c37a43983b65ddd5b9c0e3d98..60496d405ebf4a6cf0e4cf12d36ab3294617b1f3 100644 (file)
@@ -537,7 +537,7 @@ static int skcipher_recvmsg_async(struct socket *sock, struct msghdr *msg,
 
        while (iov_iter_count(&msg->msg_iter)) {
                struct skcipher_async_rsgl *rsgl;
-               unsigned long used;
+               int used;
 
                if (!ctx->used) {
                        err = skcipher_wait_for_data(sk, flags);