]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.19/xhci-use-zu-for-printing-size_t-type.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / queue-4.19 / xhci-use-zu-for-printing-size_t-type.patch
CommitLineData
14e9555d
GKH
1From c1a145a3ed9a40f3b6145feb97789e8eb49c5566 Mon Sep 17 00:00:00 2001
2From: Fabio Estevam <festevam@gmail.com>
3Date: Wed, 22 May 2019 10:35:29 -0300
4Subject: xhci: Use %zu for printing size_t type
5
6From: Fabio Estevam <festevam@gmail.com>
7
8commit c1a145a3ed9a40f3b6145feb97789e8eb49c5566 upstream.
9
10Commit 597c56e372da ("xhci: update bounce buffer with correct sg num")
11caused the following build warnings:
12
13drivers/usb/host/xhci-ring.c:676:19: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=]
14
15Use %zu for printing size_t type in order to fix the warnings.
16
17Fixes: 597c56e372da ("xhci: update bounce buffer with correct sg num")
18Reported-by: kbuild test robot <lkp@intel.com>
19Signed-off-by: Fabio Estevam <festevam@gmail.com>
20Cc: stable <stable@vger.kernel.org>
21Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24---
25 drivers/usb/host/xhci-ring.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28--- a/drivers/usb/host/xhci-ring.c
29+++ b/drivers/usb/host/xhci-ring.c
30@@ -673,7 +673,7 @@ static void xhci_unmap_td_bounce_buffer(
31 len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf,
32 seg->bounce_len, seg->bounce_offs);
33 if (len != seg->bounce_len)
34- xhci_warn(xhci, "WARN Wrong bounce buffer read length: %ld != %d\n",
35+ xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n",
36 len, seg->bounce_len);
37 seg->bounce_len = 0;
38 seg->bounce_offs = 0;
39@@ -3143,7 +3143,7 @@ static int xhci_align_td(struct xhci_hcd
40 seg->bounce_buf, new_buff_len, enqd_len);
41 if (len != seg->bounce_len)
42 xhci_warn(xhci,
43- "WARN Wrong bounce buffer write length: %ld != %d\n",
44+ "WARN Wrong bounce buffer write length: %zu != %d\n",
45 len, seg->bounce_len);
46 seg->bounce_dma = dma_map_single(dev, seg->bounce_buf,
47 max_pkt, DMA_TO_DEVICE);