]>
Commit | Line | Data |
---|---|---|
14e9555d GKH |
1 | From c1a145a3ed9a40f3b6145feb97789e8eb49c5566 Mon Sep 17 00:00:00 2001 |
2 | From: Fabio Estevam <festevam@gmail.com> | |
3 | Date: Wed, 22 May 2019 10:35:29 -0300 | |
4 | Subject: xhci: Use %zu for printing size_t type | |
5 | ||
6 | From: Fabio Estevam <festevam@gmail.com> | |
7 | ||
8 | commit c1a145a3ed9a40f3b6145feb97789e8eb49c5566 upstream. | |
9 | ||
10 | Commit 597c56e372da ("xhci: update bounce buffer with correct sg num") | |
11 | caused the following build warnings: | |
12 | ||
13 | drivers/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 | ||
15 | Use %zu for printing size_t type in order to fix the warnings. | |
16 | ||
17 | Fixes: 597c56e372da ("xhci: update bounce buffer with correct sg num") | |
18 | Reported-by: kbuild test robot <lkp@intel.com> | |
19 | Signed-off-by: Fabio Estevam <festevam@gmail.com> | |
20 | Cc: stable <stable@vger.kernel.org> | |
21 | Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> | |
22 | Signed-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); |