linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 14157/14231] kernel/resource.c:505:5: warning: no previous prototype for '__region_intersects'
@ 2021-04-21 21:33 kernel test robot
  2021-04-22  0:08 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-04-21 21:33 UTC (permalink / raw)
  To: Alistair Popple; +Cc: kbuild-all, Linux Memory Management List, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]

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: mips-randconfig-r016-20210421 (attached as .config)
compiler: mips64el-linux-gcc (GCC) 9.3.0
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
        # 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=gcc-9.3.0 make.cross W=1 ARCH=mips 

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 >>):

>> kernel/resource.c:505:5: warning: no previous prototype for '__region_intersects' [-Wmissing-prototypes]
     505 | int __region_intersects(resource_size_t start, size_t size, unsigned long flags,
         |     ^~~~~~~~~~~~~~~~~~~


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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34809 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-next:master 14157/14231] kernel/resource.c:505:5: warning: no previous prototype for '__region_intersects'
  2021-04-21 21:33 [linux-next:master 14157/14231] kernel/resource.c:505:5: warning: no previous prototype for '__region_intersects' kernel test robot
@ 2021-04-22  0:08 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2021-04-22  0:08 UTC (permalink / raw)
  To: kernel test robot
  Cc: Alistair Popple, kbuild-all, Linux Memory Management List

On Thu, 22 Apr 2021 05:33:54 +0800 kernel test robot <lkp@intel.com> wrote:

> 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: mips-randconfig-r016-20210421 (attached as .config)
> compiler: mips64el-linux-gcc (GCC) 9.3.0
> 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
>         # 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=gcc-9.3.0 make.cross W=1 ARCH=mips 
> 
> 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 >>):
> 
> >> kernel/resource.c:505:5: warning: no previous prototype for '__region_intersects' [-Wmissing-prototypes]
>      505 | int __region_intersects(resource_size_t start, size_t size, unsigned long flags,
>          |     ^~~~~~~~~~~~~~~~~~~
> 

Thanks, I made __region_intersects() static.

--- a/kernel/resource.c~kernel-resource-allow-region_intersects-users-to-hold-resource_lock-fix
+++ a/kernel/resource.c
@@ -502,8 +502,8 @@ int __weak page_is_ram(unsigned long pfn
 }
 EXPORT_SYMBOL_GPL(page_is_ram);
 
-int __region_intersects(resource_size_t start, size_t size, unsigned long flags,
-			unsigned long desc)
+static int __region_intersects(resource_size_t start, size_t size,
+			unsigned long flags, unsigned long desc)
 {
 	struct resource res;
 	int type = 0; int other = 0;
_



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-22  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 21:33 [linux-next:master 14157/14231] kernel/resource.c:505:5: warning: no previous prototype for '__region_intersects' kernel test robot
2021-04-22  0:08 ` Andrew Morton

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).