From: kbuild test robot <lkp@intel.com>
To: Henry Lin <henryl@nvidia.com>
Cc: kbuild-all@01.org, linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: [usb:usb-linus 12/16] 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}'
Date: Wed, 22 May 2019 20:54:56 +0800 [thread overview]
Message-ID: <201905222054.UDLJMD50%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3504 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus
head: f7fac17ca925faa03fc5eb854c081a24075f8bad
commit: 597c56e372dab2c7f79b8d700aad3a5deebf9d1b [12/16] xhci: update bounce buffer with correct sg num
config: i386-randconfig-x018-201920 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 597c56e372dab2c7f79b8d700aad3a5deebf9d1b
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/dma-mapping.h:7:0,
from drivers/usb/host/xhci-ring.c:57:
drivers/usb/host/xhci-ring.c: In function 'xhci_unmap_td_bounce_buffer':
>> 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=]
xhci_warn(xhci, "WARN Wrong bounce buffer read length: %ld != %d\n",
^
include/linux/device.h:1400:22: note: in definition of macro 'dev_fmt'
#define dev_fmt(fmt) fmt
^~~
>> drivers/usb/host/xhci.h:1920:2: note: in expansion of macro 'dev_warn'
dev_warn(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
^~~~~~~~
>> drivers/usb/host/xhci-ring.c:676:3: note: in expansion of macro 'xhci_warn'
xhci_warn(xhci, "WARN Wrong bounce buffer read length: %ld != %d\n",
^~~~~~~~~
drivers/usb/host/xhci-ring.c: In function 'xhci_align_td':
drivers/usb/host/xhci-ring.c:3169:5: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t {aka unsigned int}' [-Wformat=]
"WARN Wrong bounce buffer write length: %ld != %d\n",
^
include/linux/device.h:1400:22: note: in definition of macro 'dev_fmt'
#define dev_fmt(fmt) fmt
^~~
>> drivers/usb/host/xhci.h:1920:2: note: in expansion of macro 'dev_warn'
dev_warn(xhci_to_hcd(xhci)->self.controller , fmt , ## args)
^~~~~~~~
drivers/usb/host/xhci-ring.c:3168:4: note: in expansion of macro 'xhci_warn'
xhci_warn(xhci,
^~~~~~~~~
vim +676 drivers/usb/host/xhci-ring.c
652
653 static void xhci_unmap_td_bounce_buffer(struct xhci_hcd *xhci,
654 struct xhci_ring *ring, struct xhci_td *td)
655 {
656 struct device *dev = xhci_to_hcd(xhci)->self.controller;
657 struct xhci_segment *seg = td->bounce_seg;
658 struct urb *urb = td->urb;
659 size_t len;
660
661 if (!ring || !seg || !urb)
662 return;
663
664 if (usb_urb_dir_out(urb)) {
665 dma_unmap_single(dev, seg->bounce_dma, ring->bounce_buf_len,
666 DMA_TO_DEVICE);
667 return;
668 }
669
670 dma_unmap_single(dev, seg->bounce_dma, ring->bounce_buf_len,
671 DMA_FROM_DEVICE);
672 /* for in tranfers we need to copy the data from bounce to sg */
673 len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf,
674 seg->bounce_len, seg->bounce_offs);
675 if (len != seg->bounce_len)
> 676 xhci_warn(xhci, "WARN Wrong bounce buffer read length: %ld != %d\n",
677 len, seg->bounce_len);
678 seg->bounce_len = 0;
679 seg->bounce_offs = 0;
680 }
681
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37207 bytes --]
next reply other threads:[~2019-05-22 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 12:54 kbuild test robot [this message]
2019-05-22 13:08 ` [usb:usb-linus 12/16] 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}' Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201905222054.UDLJMD50%lkp@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=henryl@nvidia.com \
--cc=kbuild-all@01.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).