Commit c1a145a3 authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

xhci: Use %zu for printing size_t type

Commit 597c56e3 ("xhci: update bounce buffer with correct sg num")
caused the following build warnings:

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=]

Use %zu for printing size_t type in order to fix the warnings.

Fixes: 597c56e3 ("xhci: update bounce buffer with correct sg num")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7fac17c
...@@ -673,7 +673,7 @@ static void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci, ...@@ -673,7 +673,7 @@ static void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci,
len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf, len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf,
seg->bounce_len, seg->bounce_offs); seg->bounce_len, seg->bounce_offs);
if (len != seg->bounce_len) if (len != seg->bounce_len)
xhci_warn(xhci, "WARN Wrong bounce buffer read length: %ld != %d\n", xhci_warn(xhci, "WARN Wrong bounce buffer read length: %zu != %d\n",
len, seg->bounce_len); len, seg->bounce_len);
seg->bounce_len = 0; seg->bounce_len = 0;
seg->bounce_offs = 0; seg->bounce_offs = 0;
...@@ -3166,7 +3166,7 @@ static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32 enqd_len, ...@@ -3166,7 +3166,7 @@ static int xhci_align_td(struct xhci_hcd *xhci, struct urb *urb, u32 enqd_len,
seg->bounce_buf, new_buff_len, enqd_len); seg->bounce_buf, new_buff_len, enqd_len);
if (len != seg->bounce_len) if (len != seg->bounce_len)
xhci_warn(xhci, xhci_warn(xhci,
"WARN Wrong bounce buffer write length: %ld != %d\n", "WARN Wrong bounce buffer write length: %zu != %d\n",
len, seg->bounce_len); len, seg->bounce_len);
seg->bounce_dma = dma_map_single(dev, seg->bounce_buf, seg->bounce_dma = dma_map_single(dev, seg->bounce_buf,
max_pkt, DMA_TO_DEVICE); max_pkt, DMA_TO_DEVICE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment