From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [xhci:for-usb-next 19/27] drivers/usb/host/xhci-dbgcap.c:410:1: warning: no previous prototype for function 'xhci_dbc_ring_alloc'
Date: Fri, 24 Jul 2020 12:05:15 +0800 [thread overview]
Message-ID: <202007241208.1frxPy7E%lkp@intel.com> (raw)
[-- 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 --]
reply other threads:[~2020-07-24 4:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202007241208.1frxPy7E%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 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.