{
struct acc_dev *dev = fp->private_data;
struct usb_request *req;
- int r = count, xfer;
+ ssize_t r = count;
+ unsigned xfer;
int ret = 0;
- pr_debug("acc_read(%d)\n", count);
+ pr_debug("acc_read(%zu)\n", count);
if (dev->disconnected)
return -ENODEV;
if (req->actual == 0)
goto requeue_req;
- pr_debug("rx %p %d\n", req, req->actual);
+ pr_debug("rx %p %u\n", req, req->actual);
xfer = (req->actual < count) ? req->actual : count;
r = xfer;
if (copy_to_user(buf, req->buf, xfer))
r = -EIO;
done:
- pr_debug("acc_read returning %d\n", r);
+ pr_debug("acc_read returning %zd\n", r);
return r;
}
{
struct acc_dev *dev = fp->private_data;
struct usb_request *req = 0;
- int r = count, xfer;
+ ssize_t r = count;
+ unsigned xfer;
int ret;
- pr_debug("acc_write(%d)\n", count);
+ pr_debug("acc_write(%zu)\n", count);
if (!dev->online || dev->disconnected)
return -ENODEV;
if (req)
req_put(dev, &dev->tx_idle, req);
- pr_debug("acc_write returning %d\n", r);
+ pr_debug("acc_write returning %zd\n", r);
return r;
}
struct mtp_dev *dev = fp->private_data;
struct usb_composite_dev *cdev = dev->cdev;
struct usb_request *req;
- int r = count, xfer;
+ ssize_t r = count;
+ unsigned xfer;
int ret = 0;
- DBG(cdev, "mtp_read(%d)\n", count);
+ DBG(cdev, "mtp_read(%zu)\n", count);
if (count > MTP_BULK_BUFFER_SIZE)
return -EINVAL;
dev->state = STATE_READY;
spin_unlock_irq(&dev->lock);
- DBG(cdev, "mtp_read returning %d\n", r);
+ DBG(cdev, "mtp_read returning %zd\n", r);
return r;
}
struct mtp_dev *dev = fp->private_data;
struct usb_composite_dev *cdev = dev->cdev;
struct usb_request *req = 0;
- int r = count, xfer;
+ ssize_t r = count;
+ unsigned xfer;
int sendZLP = 0;
int ret;
- DBG(cdev, "mtp_write(%d)\n", count);
+ DBG(cdev, "mtp_write(%zu)\n", count);
spin_lock_irq(&dev->lock);
if (dev->state == STATE_CANCELED) {
dev->state = STATE_READY;
spin_unlock_irq(&dev->lock);
- DBG(cdev, "mtp_write returning %d\n", r);
+ DBG(cdev, "mtp_write returning %zd\n", r);
return r;
}
int ret;
int length = event->length;
- DBG(dev->cdev, "mtp_send_event(%d)\n", event->length);
+ DBG(dev->cdev, "mtp_send_event(%zu)\n", event->length);
if (length < 0 || length > INTR_BUFFER_SIZE)
return -EINVAL;