On Sat, Sep 28, 2013 at 07:42:50PM +0200, Dominik Paulus wrote: > @@ -352,34 +352,29 @@ int usbip_recv(struct socket *sock, void *buf, int size) > > usbip_dbg_xmit("enter\n"); > > - if (!sock || !buf || !size) { > - pr_err("invalid arg, sock %p buff %p size %d\n", sock, buf, > + if (!ud || !buf || !size) { > + pr_err("invalid arg, ud %p buff %p size %d\n", ud, buf, > size); "size" can fit on the first line now. pr_err("invalid arg, ud %p buff %p size %d\n", ud, buf, size); > return -EINVAL; > } > > - do { > - sock->sk->sk_allocation = GFP_NOIO; > - iov.iov_base = buf; > - iov.iov_len = size; > - msg.msg_name = NULL; > - msg.msg_namelen = 0; > - msg.msg_control = NULL; > - msg.msg_controllen = 0; > - msg.msg_namelen = 0; > - msg.msg_flags = MSG_NOSIGNAL; > - > - result = kernel_recvmsg(sock, &msg, &iov, 1, size, MSG_WAITALL); > - if (result <= 0) { > - pr_debug("receive sock %p buf %p size %u ret %d total %d\n", > - sock, buf, size, result, total); > - goto err; > - } > - > - size -= result; > - buf += result; > - total += result; > - } while (size > 0); > + ud->tcp_socket->sk->sk_allocation = GFP_NOIO; > + iov.iov_base = buf; > + iov.iov_len = size; > + msg.msg_name = NULL; > + msg.msg_namelen = 0; > + msg.msg_control = NULL; > + msg.msg_controllen = 0; > + msg.msg_namelen = 0; > + msg.msg_flags = MSG_NOSIGNAL; > + > + result = usbip_recvmsg(ud, &msg, &iov, 1, size, MSG_WAITALL); > + Don't put a blank line here. > + if (result < 0) { > + pr_debug("receive sock %p buf %p size %u ret %d total %d\n", > + ud->tcp_socket, buf, size, result, total); > + return result; > + } > regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel