Web lists-archives.com

[tip:x86/mm 4/4] htmldocs: kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res'




tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/mm
head:   b69c2e20f6e4046da84ce5b33ba1ef89cb087b40
commit: b69c2e20f6e4046da84ce5b33ba1ef89cb087b40 [4/4] resource: Clean it up a bit
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org)
   kernel/resource.c:337: warning: Function parameter or member 'start' not described in 'find_next_iomem_res'
   kernel/resource.c:337: warning: Function parameter or member 'end' not described in 'find_next_iomem_res'
   kernel/resource.c:337: warning: Function parameter or member 'flags' not described in 'find_next_iomem_res'
   kernel/resource.c:337: warning: Function parameter or member 'desc' not described in 'find_next_iomem_res'
>> kernel/resource.c:337: warning: Function parameter or member 'first_lvl' not described in 'find_next_iomem_res'
   kernel/resource.c:337: warning: Function parameter or member 'res' not described in 'find_next_iomem_res'
>> kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc'
>> kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc'
>> kernel/resource.c:409: warning: Function parameter or member 'arg' not described in 'walk_iomem_res_desc'
>> kernel/resource.c:409: warning: Function parameter or member 'func' not described in 'walk_iomem_res_desc'
   include/linux/srcu.h:175: warning: Function parameter or member 'p' not described in 'srcu_dereference_notrace'
   include/linux/srcu.h:175: warning: Function parameter or member 'sp' not described in 'srcu_dereference_notrace'
   include/linux/gfp.h:1: warning: no structured comments found
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.ibss' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.connect' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.keys' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.ie' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.ie_len' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.bssid' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.ssid' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.default_key' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.default_mgmt_key' not described in 'wireless_dev'
   include/net/cfg80211.h:4381: warning: Function parameter or member 'wext.prev_bssid_valid' not described in 'wireless_dev'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'
   include/net/cfg80211.h:4869: warning: Excess function parameter 'ptr' description in 'reg_query_regdb_wmm'

vim +337 kernel/resource.c

^1da177e4 Linus Torvalds    2005-04-16  320  
010a93bf9 Bjorn Helgaas     2018-09-27  321  /**
010a93bf9 Bjorn Helgaas     2018-09-27  322   * Finds the lowest iomem resource that covers part of [start..end].  The
010a93bf9 Bjorn Helgaas     2018-09-27  323   * caller must specify start, end, flags, and desc (which may be
010a93bf9 Bjorn Helgaas     2018-09-27  324   * IORES_DESC_NONE).
010a93bf9 Bjorn Helgaas     2018-09-27  325   *
010a93bf9 Bjorn Helgaas     2018-09-27  326   * If a resource is found, returns 0 and *res is overwritten with the part
010a93bf9 Bjorn Helgaas     2018-09-27  327   * of the resource that's within [start..end]; if none is found, returns
010a93bf9 Bjorn Helgaas     2018-09-27  328   * -1.
010a93bf9 Bjorn Helgaas     2018-09-27  329   *
010a93bf9 Bjorn Helgaas     2018-09-27  330   * This function walks the whole tree and not just first level children
b69c2e20f Borislav Petkov   2018-10-09  331   * unless @first_lvl is true.
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  332   */
010a93bf9 Bjorn Helgaas     2018-09-27  333  static int find_next_iomem_res(resource_size_t start, resource_size_t end,
010a93bf9 Bjorn Helgaas     2018-09-27  334  			       unsigned long flags, unsigned long desc,
b69c2e20f Borislav Petkov   2018-10-09  335  			       bool first_lvl, struct resource *res)
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  336  {
2842f1141 KAMEZAWA Hiroyuki 2006-06-27 @337  	struct resource *p;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  338  
b69c2e20f Borislav Petkov   2018-10-09  339  	if (!res)
b69c2e20f Borislav Petkov   2018-10-09  340  		return -EINVAL;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  341  
b69c2e20f Borislav Petkov   2018-10-09  342  	if (start >= end)
b69c2e20f Borislav Petkov   2018-10-09  343  		return -EINVAL;
8c86e70ac Vivek Goyal       2014-08-08  344  
800df627e Vivek Goyal       2014-08-29  345  	read_lock(&resource_lock);
800df627e Vivek Goyal       2014-08-29  346  
b69c2e20f Borislav Petkov   2018-10-09  347  	for (p = iomem_resource.child; p; p = next_resource(p, first_lvl)) {
010a93bf9 Bjorn Helgaas     2018-09-27  348  		if ((p->flags & flags) != flags)
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  349  			continue;
3f33647c4 Toshi Kani        2016-01-26  350  		if ((desc != IORES_DESC_NONE) && (desc != p->desc))
3f33647c4 Toshi Kani        2016-01-26  351  			continue;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  352  		if (p->start > end) {
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  353  			p = NULL;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  354  			break;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  355  		}
a98959fdb Bjorn Helgaas     2018-09-27  356  		if ((p->end >= start) && (p->start <= end))
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  357  			break;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  358  	}
8c86e70ac Vivek Goyal       2014-08-08  359  
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  360  	read_unlock(&resource_lock);
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  361  	if (!p)
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  362  		return -1;
010a93bf9 Bjorn Helgaas     2018-09-27  363  
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  364  	/* copy data */
010a93bf9 Bjorn Helgaas     2018-09-27  365  	res->start = max(start, p->start);
010a93bf9 Bjorn Helgaas     2018-09-27  366  	res->end = min(end, p->end);
0e4c12b45 Tom Lendacky      2017-10-20  367  	res->flags = p->flags;
0e4c12b45 Tom Lendacky      2017-10-20  368  	res->desc = p->desc;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  369  	return 0;
2842f1141 KAMEZAWA Hiroyuki 2006-06-27  370  }
908eedc61 KAMEZAWA Hiroyuki 2009-09-22  371  
010a93bf9 Bjorn Helgaas     2018-09-27  372  static int __walk_iomem_res_desc(resource_size_t start, resource_size_t end,
010a93bf9 Bjorn Helgaas     2018-09-27  373  				 unsigned long flags, unsigned long desc,
b69c2e20f Borislav Petkov   2018-10-09  374  				 bool first_lvl, void *arg,
1d2e733b1 Tom Lendacky      2017-10-20  375  				 int (*func)(struct resource *, void *))
4ac2aed83 Tom Lendacky      2017-10-20  376  {
010a93bf9 Bjorn Helgaas     2018-09-27  377  	struct resource res;
4ac2aed83 Tom Lendacky      2017-10-20  378  	int ret = -1;
4ac2aed83 Tom Lendacky      2017-10-20  379  
010a93bf9 Bjorn Helgaas     2018-09-27  380  	while (start < end &&
b69c2e20f Borislav Petkov   2018-10-09  381  	       !find_next_iomem_res(start, end, flags, desc, first_lvl, &res)) {
010a93bf9 Bjorn Helgaas     2018-09-27  382  		ret = (*func)(&res, arg);
4ac2aed83 Tom Lendacky      2017-10-20  383  		if (ret)
4ac2aed83 Tom Lendacky      2017-10-20  384  			break;
4ac2aed83 Tom Lendacky      2017-10-20  385  
010a93bf9 Bjorn Helgaas     2018-09-27  386  		start = res.end + 1;
4ac2aed83 Tom Lendacky      2017-10-20  387  	}
4ac2aed83 Tom Lendacky      2017-10-20  388  
4ac2aed83 Tom Lendacky      2017-10-20  389  	return ret;
4ac2aed83 Tom Lendacky      2017-10-20  390  }
4ac2aed83 Tom Lendacky      2017-10-20  391  
b69c2e20f Borislav Petkov   2018-10-09  392  /**
8c86e70ac Vivek Goyal       2014-08-08  393   * Walks through iomem resources and calls func() with matching resource
8c86e70ac Vivek Goyal       2014-08-08  394   * ranges. This walks through whole tree and not just first level children.
8c86e70ac Vivek Goyal       2014-08-08  395   * All the memory ranges which overlap start,end and also match flags and
3f33647c4 Toshi Kani        2016-01-26  396   * desc are valid candidates.
3f33647c4 Toshi Kani        2016-01-26  397   *
3f33647c4 Toshi Kani        2016-01-26  398   * @desc: I/O resource descriptor. Use IORES_DESC_NONE to skip @desc check.
3f33647c4 Toshi Kani        2016-01-26  399   * @flags: I/O resource flags
3f33647c4 Toshi Kani        2016-01-26  400   * @start: start addr
3f33647c4 Toshi Kani        2016-01-26  401   * @end: end addr
3f33647c4 Toshi Kani        2016-01-26  402   *
3f33647c4 Toshi Kani        2016-01-26  403   * NOTE: For a new descriptor search, define a new IORES_DESC in
3f33647c4 Toshi Kani        2016-01-26  404   * <linux/ioport.h> and set it in 'desc' of a target resource entry.
3f33647c4 Toshi Kani        2016-01-26  405   */
3f33647c4 Toshi Kani        2016-01-26  406  int walk_iomem_res_desc(unsigned long desc, unsigned long flags, u64 start,
1d2e733b1 Tom Lendacky      2017-10-20  407  		u64 end, void *arg, int (*func)(struct resource *, void *))
3f33647c4 Toshi Kani        2016-01-26  408  {
010a93bf9 Bjorn Helgaas     2018-09-27 @409  	return __walk_iomem_res_desc(start, end, flags, desc, false, arg, func);
3f33647c4 Toshi Kani        2016-01-26  410  }
d76401ade Dan Williams      2018-06-02  411  EXPORT_SYMBOL_GPL(walk_iomem_res_desc);
3f33647c4 Toshi Kani        2016-01-26  412  

:::::: The code at line 337 was first introduced by commit
:::::: 2842f11419704f8707fffc82e10d2263427fc130 [PATCH] catch valid mem range at onlining memory

:::::: TO: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip