[linux-next:master 14157/14231] kernel/resource.c:505:5: warning: no previous prototype for function '__region_intersects'
From: kernel test robot <hidden>
Date: 2021-04-21 21:49:21
Also in:
oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b74523885a715463203d4ccc3cf8c85952d3701a commit: edede6a2ecfe8553e8232eb863a7a13ef40da3a2 [14157/14231] kernel/resource: allow region_intersects users to hold resource_lock config: powerpc-randconfig-r011-20210421 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d87b9b81ccb95217181ce75515c6c68bbb408ca4) 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 powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=edede6a2ecfe8553e8232eb863a7a13ef40da3a2 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout edede6a2ecfe8553e8232eb863a7a13ef40da3a2 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>):
quoted
kernel/resource.c:505:5: warning: no previous prototype for function '__region_intersects' [-Wmissing-prototypes]
int __region_intersects(resource_size_t start, size_t size, unsigned long flags,
^
kernel/resource.c:505:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __region_intersects(resource_size_t start, size_t size, unsigned long flags,
^
static
1 warning generated.
vim +/__region_intersects +505 kernel/resource.c
504
> 505 int __region_intersects(resource_size_t start, size_t size, unsigned long flags,
506 unsigned long desc)
507 {
508 struct resource res;
509 int type = 0; int other = 0;
510 struct resource *p;
511
512 res.start = start;
513 res.end = start + size - 1;
514
515 for (p = iomem_resource.child; p ; p = p->sibling) {
516 bool is_type = (((p->flags & flags) == flags) &&
517 ((desc == IORES_DESC_NONE) ||
518 (desc == p->desc)));
519
520 if (resource_overlaps(p, &res))
521 is_type ? type++ : other++;
522 }
523
524 if (type == 0)
525 return REGION_DISJOINT;
526
527 if (other == 0)
528 return REGION_INTERSECTS;
529
530 return REGION_MIXED;
531 }
532
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 30108 bytes