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@xxxxxxxxx> 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:
.config.gz
Description: application/gzip