* [xhci:for-usb-next 19/27] drivers/usb/host/xhci-dbgcap.c:410:1: warning: no previous prototype for function 'xhci_dbc_ring_alloc'
@ 2020-07-24 4:05 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-24 4:05 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git for-usb-next
head: 044dea1e1b49139f65a0fd11637daebb233123ef
commit: 461a5545eec20e9cc933b900f5efe7f4bce655ae [19/27] xhci: dbc: don't use generic xhci ring allocation functions for dbc.
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e0ee2288424952e0445f096ae7800472eac11249)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 461a5545eec20e9cc933b900f5efe7f4bce655ae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/usb/host/xhci-dbgcap.c:410:1: warning: no previous prototype for function 'xhci_dbc_ring_alloc' [-Wmissing-prototypes]
xhci_dbc_ring_alloc(struct device *dev, enum xhci_ring_type type, gfp_t flags)
^
drivers/usb/host/xhci-dbgcap.c:409:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct xhci_ring *
^
static
drivers/usb/host/xhci-dbgcap.c:530:18: warning: unused variable 'dev' [-Wunused-variable]
struct device *dev = xhci_to_hcd(xhci)->self.controller;
^
2 warnings generated.
vim +/xhci_dbc_ring_alloc +410 drivers/usb/host/xhci-dbgcap.c
408
409 struct xhci_ring *
> 410 xhci_dbc_ring_alloc(struct device *dev, enum xhci_ring_type type, gfp_t flags)
411 {
412 struct xhci_ring *ring;
413 struct xhci_segment *seg;
414 dma_addr_t dma;
415
416 ring = kzalloc(sizeof(*ring), flags);
417 if (!ring)
418 return NULL;
419
420 ring->num_segs = 1;
421 ring->type = type;
422
423 seg = kzalloc(sizeof(*seg), flags);
424 if (!seg)
425 goto seg_fail;
426
427 ring->first_seg = seg;
428 ring->last_seg = seg;
429 seg->next = seg;
430
431 seg->trbs = dma_alloc_coherent(dev, TRB_SEGMENT_SIZE, &dma, flags);
432 if (!seg->trbs)
433 goto dma_fail;
434
435 seg->dma = dma;
436
437 /* Only event ring does not use link TRB */
438 if (type != TYPE_EVENT) {
439 union xhci_trb *trb = &seg->trbs[TRBS_PER_SEGMENT - 1];
440
441 trb->link.segment_ptr = cpu_to_le64(dma);
442 trb->link.control = cpu_to_le32(LINK_TOGGLE | TRB_TYPE(TRB_LINK));
443 }
444 INIT_LIST_HEAD(&ring->td_list);
445 xhci_initialize_ring_info(ring, 1);
446 return ring;
447 dma_fail:
448 kfree(seg);
449 seg_fail:
450 kfree(ring);
451 return NULL;
452 }
453
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 75356 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-24 4:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-24 4:05 [xhci:for-usb-next 19/27] drivers/usb/host/xhci-dbgcap.c:410:1: warning: no previous prototype for function 'xhci_dbc_ring_alloc' kernel test robot
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.