* [PATCH v2] xhci: Use %zu for printing size_t type
@ 2019-05-22 13:35 Fabio Estevam
2019-05-22 14:08 ` Mathias Nyman
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2019-05-22 13:35 UTC (permalink / raw)
To: gregkh; +Cc: mathias.nyman, linux-usb, henryl, Fabio Estevam
Commit 597c56e372da ("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: 597c56e372da ("xhci: update bounce buffer with correct sg num")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Fixed a typo when referencing the commit hci-->xhci
drivers/usb/host/xhci-ring.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index ef7c8698772e..d04023d396d8 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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,
seg->bounce_len, seg->bounce_offs);
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);
seg->bounce_len = 0;
seg->bounce_offs = 0;
@@ -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);
if (len != seg->bounce_len)
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);
seg->bounce_dma = dma_map_single(dev, seg->bounce_buf,
max_pkt, DMA_TO_DEVICE);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] xhci: Use %zu for printing size_t type
2019-05-22 13:35 [PATCH v2] xhci: Use %zu for printing size_t type Fabio Estevam
@ 2019-05-22 14:08 ` Mathias Nyman
2019-05-22 16:20 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Mathias Nyman @ 2019-05-22 14:08 UTC (permalink / raw)
To: Fabio Estevam, gregkh; +Cc: mathias.nyman, linux-usb, henryl
On 22.5.2019 16.35, Fabio Estevam wrote:
> Commit 597c56e372da ("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: 597c56e372da ("xhci: update bounce buffer with correct sg num")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
Thanks for writing this follow-up patch
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] xhci: Use %zu for printing size_t type
2019-05-22 14:08 ` Mathias Nyman
@ 2019-05-22 16:20 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-05-22 16:20 UTC (permalink / raw)
To: Mathias Nyman; +Cc: Fabio Estevam, mathias.nyman, linux-usb, henryl
On Wed, May 22, 2019 at 05:08:13PM +0300, Mathias Nyman wrote:
> On 22.5.2019 16.35, Fabio Estevam wrote:
> > Commit 597c56e372da ("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: 597c56e372da ("xhci: update bounce buffer with correct sg num")
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Signed-off-by: Fabio Estevam <festevam@gmail.com>
> > ---
>
> Thanks for writing this follow-up patch
>
> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
>
>
Thanks, now queued up.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-22 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 13:35 [PATCH v2] xhci: Use %zu for printing size_t type Fabio Estevam
2019-05-22 14:08 ` Mathias Nyman
2019-05-22 16:20 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.