]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - crypto/algif_skcipher.c
pinctrl: single: Constify irq_domain_ops
[karo-tx-linux.git] / crypto / algif_skcipher.c
index 8f903b6df29978987b1c70e4589d46218095b202..945075292bc9584e57f4612bb1b7549a8e9e9b22 100644 (file)
@@ -641,7 +641,7 @@ static int skcipher_recvmsg_sync(struct socket *sock, struct msghdr *msg,
        long copied = 0;
 
        lock_sock(sk);
-       while (iov_iter_count(&msg->msg_iter)) {
+       while (msg_data_left(msg)) {
                sgl = list_first_entry(&ctx->tsgl,
                                       struct skcipher_sg_list, list);
                sg = sgl->sg;
@@ -655,7 +655,7 @@ static int skcipher_recvmsg_sync(struct socket *sock, struct msghdr *msg,
                                goto unlock;
                }
 
-               used = min_t(unsigned long, ctx->used, iov_iter_count(&msg->msg_iter));
+               used = min_t(unsigned long, ctx->used, msg_data_left(msg));
 
                used = af_alg_make_sg(&ctx->rsgl, &msg->msg_iter, used);
                err = used;