Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6066335 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: gadget: Compilation fixes for 64-bit support"

parents 4a94b0aa b6049f70
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -599,7 +599,7 @@ static ssize_t acc_read(struct file *fp, char __user *buf,
	int r = count, xfer, len;
	int ret = 0;

	pr_debug("acc_read(%d)\n", count);
	pr_debug("acc_read(%zd)\n", count);

	if (dev->disconnected)
		return -ENODEV;
@@ -663,7 +663,7 @@ static ssize_t acc_write(struct file *fp, const char __user *buf,
	int r = count, xfer;
	int ret;

	pr_debug("acc_write(%d)\n", count);
	pr_debug("acc_write(%zd)\n", count);

	if (!dev->online || dev->disconnected)
		return -ENODEV;
+8 −7
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ ccid_function_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
	ccid_dev->notify_req->context = ccid_dev;

	/* now allocate requests for our endpoints */
	req = ccid_request_alloc(ccid_dev->out, BULK_OUT_BUFFER_SIZE,
	req = ccid_request_alloc(ccid_dev->out, (unsigned)BULK_OUT_BUFFER_SIZE,
							GFP_ATOMIC);
	if (IS_ERR(req)) {
		pr_err("%s: unable to allocate memory for out req\n",
@@ -406,7 +406,8 @@ ccid_function_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
	bulk_dev->rx_req = req;

	for (i = 0; i < TX_REQ_MAX; i++) {
		req = ccid_request_alloc(ccid_dev->in, BULK_IN_BUFFER_SIZE,
		req = ccid_request_alloc(ccid_dev->in,
				(unsigned)BULK_IN_BUFFER_SIZE,
				GFP_ATOMIC);
		if (IS_ERR(req)) {
			pr_err("%s: unable to allocate memory for in req\n",
@@ -612,10 +613,10 @@ static ssize_t ccid_bulk_read(struct file *fp, char __user *buf,
	int ret;
	unsigned long flags;

	pr_debug("ccid_bulk_read(%d)\n", count);
	pr_debug("ccid_bulk_read(%zu)\n", count);

	if (count > BULK_OUT_BUFFER_SIZE) {
		pr_err("%s: max_buffer_size:%d given_pkt_size:%d\n",
		pr_err("%s: max_buffer_size:%zu given_pkt_size:%zu\n",
				__func__, BULK_OUT_BUFFER_SIZE, count);
		return -ENOMEM;
	}
@@ -704,7 +705,7 @@ static ssize_t ccid_bulk_write(struct file *fp, const char __user *buf,
	int ret;
	unsigned long flags;

	pr_debug("ccid_bulk_write(%d)\n", count);
	pr_debug("ccid_bulk_write(%zu)\n", count);

	if (!atomic_read(&ccid_dev->online)) {
		pr_debug("%s: USB cable not connected\n", __func__);
@@ -716,7 +717,7 @@ static ssize_t ccid_bulk_write(struct file *fp, const char __user *buf,
		return -ENODEV;
	}
	if (count > BULK_IN_BUFFER_SIZE) {
		pr_err("%s: max_buffer_size:%d given_pkt_size:%d\n",
		pr_err("%s: max_buffer_size:%zu given_pkt_size:%zu\n",
				__func__, BULK_IN_BUFFER_SIZE, count);
		return -ENOMEM;
	}
+1 −1
Original line number Diff line number Diff line
@@ -766,7 +766,7 @@ static ssize_t ffs_epfile_io(struct file *file,
	int halt;
	int buffer_len = 0;

	pr_debug("%s: len %d, read %d\n", __func__, len, read);
	pr_debug("%s: len %zu, read %d\n", __func__, len, read);

	goto first_try;
	do {
+6 −6
Original line number Diff line number Diff line
@@ -1721,7 +1721,7 @@ mbim_read(struct file *fp, char __user *buf, size_t count, loff_t *pos)
	struct ctrl_pkt *cpkt = NULL;
	int ret = 0;

	pr_debug("Enter(%d)\n", count);
	pr_debug("Enter(%zu)\n", count);

	if (!dev) {
		pr_err("Received NULL mbim pointer\n");
@@ -1729,7 +1729,7 @@ mbim_read(struct file *fp, char __user *buf, size_t count, loff_t *pos)
	}

	if (count > MBIM_BULK_BUFFER_SIZE) {
		pr_err("Buffer size is too big %d, should be at most %d\n",
		pr_err("Buffer size is too big %zu, should be at most %d\n",
			count, MBIM_BULK_BUFFER_SIZE);
		return -EINVAL;
	}
@@ -1764,7 +1764,7 @@ mbim_read(struct file *fp, char __user *buf, size_t count, loff_t *pos)
	if (cpkt->len > count) {
		spin_unlock(&dev->lock);
		mbim_unlock(&dev->read_excl);
		pr_err("cpkt size too big:%d > buf size:%d\n",
		pr_err("cpkt size too big:%d > buf size:%zu\n",
				cpkt->len, count);
		return -ENOMEM;
	}
@@ -1796,7 +1796,7 @@ mbim_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos)
	struct ctrl_pkt *cpkt = NULL;
	int ret = 0;

	pr_debug("Enter(%d)", count);
	pr_debug("Enter(%zu)", count);

	if (!dev) {
		pr_err("Received NULL mbim pointer\n");
@@ -1809,7 +1809,7 @@ mbim_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos)
	}

	if (count > MAX_CTRL_PKT_SIZE) {
		pr_err("given pkt size too big:%d > max_pkt_size:%d\n",
		pr_err("given pkt size too big:%zu > max_pkt_size:%d\n",
				count, MAX_CTRL_PKT_SIZE);
		return -ENOMEM;
	}
@@ -1844,7 +1844,7 @@ mbim_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos)

	mbim_unlock(&dev->write_excl);

	pr_debug("Exit(%d)", count);
	pr_debug("Exit(%zu)", count);

	return count;

+3 −3
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ static ssize_t mtp_read(struct file *fp, char __user *buf,
	int r = count, xfer, len;
	int ret = 0;

	DBG(cdev, "mtp_read(%d)\n", count);
	DBG(cdev, "mtp_read(%zu)\n", count);

	len = ALIGN(count, dev->ep_out->maxpacket);

@@ -651,7 +651,7 @@ static ssize_t mtp_write(struct file *fp, const char __user *buf,
	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) {
@@ -942,7 +942,7 @@ static int mtp_send_event(struct mtp_dev *dev, struct mtp_event *event)
	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;
Loading