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

Commit 89a8a81c authored by Jordan Crouse's avatar Jordan Crouse Committed by Hemant Kumar
Browse files

usb: Fix compiler warnings



Fix two printk warnings in f_rndis and an incorrect call to
scnprintf() in u_ether_configfs.h.

Fixes: b42170b2 ("usb: Add support for rndis uplink aggregation")
Change-Id: Ic0dedbad1a970ddb76c3139fcf17efd2c86e6bd1
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent e222d4df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1137,7 +1137,7 @@ int rndis_rm_hdr(struct gether *port,
		}

		if (skb->len < sizeof(*hdr)) {
			pr_err("invalid rndis pkt: skblen:%u hdr_len:%u\n",
			pr_err("invalid rndis pkt: skblen:%u hdr_len:%lu\n",
					skb->len, sizeof(*hdr));
			dev_kfree_skb_any(skb);
			return -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ rx_submit(struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
	if (dev->port_usb->is_fixed)
		size = max_t(size_t, size, dev->port_usb->fixed_out_len);

	DBG(dev, "%s: size: %d\n", __func__, size);
	DBG(dev, "%s: size: %zd\n", __func__, size);
	skb = __netdev_alloc_skb(dev->net, size + NET_IP_ALIGN, gfp_flags);
	if (skb == NULL) {
		DBG(dev, "no rx skb\n");
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ out: \
		mutex_lock(&opts->lock);				\
		max = gether_get_ul_max_pkts_per_xfer(opts->net);	\
		mutex_unlock(&opts->lock);				\
		return scnprintf(page, "%d\n", max);			\
		return scnprintf(page, PAGE_SIZE, "%d\n", max);		\
	}								\
									\
	static ssize_t							\