All of lore.kernel.org
 help / color / mirror / Atom feed
* [rui:linux-next 9/13] drivers/acpi/scan.c:2152 acpi_walk_dep_device_list() error: uninitialized symbol 'ret'.
@ 2021-06-28  9:06 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-06-27 11:56 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: Daniel Scally <djrscally@gmail.com>
CC: Huang Rui <ray.huang@amd.com>
CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
CC: "Rafael J. Wysocki" <rjw@rjwysocki.net>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rui/linux.git linux-next
head:   efd4c04742d30bb71022f50cd5451a0fbe52aa56
commit: 018f81b667154ad8ee504bc36f52dc26f4f1cb87 [9/13] ACPI: scan: Extend acpi_walk_dep_device_list()
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: i386-randconfig-m021-20210627 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/acpi/scan.c:2152 acpi_walk_dep_device_list() error: uninitialized symbol 'ret'.

vim +/ret +2152 drivers/acpi/scan.c

018f81b667154a Daniel Scally 2021-06-03  2122  
018f81b667154a Daniel Scally 2021-06-03  2123  /**
018f81b667154a Daniel Scally 2021-06-03  2124   * acpi_walk_dep_device_list - Apply a callback to every entry in acpi_dep_list
018f81b667154a Daniel Scally 2021-06-03  2125   * @handle:	The ACPI handle of the supplier device
018f81b667154a Daniel Scally 2021-06-03  2126   * @callback:	Pointer to the callback function to apply
018f81b667154a Daniel Scally 2021-06-03  2127   * @data:	Pointer to some data to pass to the callback
018f81b667154a Daniel Scally 2021-06-03  2128   *
018f81b667154a Daniel Scally 2021-06-03  2129   * The return value of the callback determines this function's behaviour. If 0
018f81b667154a Daniel Scally 2021-06-03  2130   * is returned we continue to iterate over acpi_dep_list. If a positive value
018f81b667154a Daniel Scally 2021-06-03  2131   * is returned then the loop is broken but this function returns 0. If a
018f81b667154a Daniel Scally 2021-06-03  2132   * negative value is returned by the callback then the loop is broken and that
018f81b667154a Daniel Scally 2021-06-03  2133   * value is returned as the final error.
018f81b667154a Daniel Scally 2021-06-03  2134   */
018f81b667154a Daniel Scally 2021-06-03  2135  int acpi_walk_dep_device_list(acpi_handle handle,
018f81b667154a Daniel Scally 2021-06-03  2136  			      int (*callback)(struct acpi_dep_data *, void *),
018f81b667154a Daniel Scally 2021-06-03  2137  			      void *data)
018f81b667154a Daniel Scally 2021-06-03  2138  {
018f81b667154a Daniel Scally 2021-06-03  2139  	struct acpi_dep_data *dep, *tmp;
018f81b667154a Daniel Scally 2021-06-03  2140  	int ret;
018f81b667154a Daniel Scally 2021-06-03  2141  
018f81b667154a Daniel Scally 2021-06-03  2142  	mutex_lock(&acpi_dep_list_lock);
018f81b667154a Daniel Scally 2021-06-03  2143  	list_for_each_entry_safe(dep, tmp, &acpi_dep_list, node) {
018f81b667154a Daniel Scally 2021-06-03  2144  		if (dep->supplier == handle) {
018f81b667154a Daniel Scally 2021-06-03  2145  			ret = callback(dep, data);
018f81b667154a Daniel Scally 2021-06-03  2146  			if (ret)
018f81b667154a Daniel Scally 2021-06-03  2147  				break;
40e7fcb19293cb Lan Tianyu    2014-11-23  2148  		}
40e7fcb19293cb Lan Tianyu    2014-11-23  2149  	}
40e7fcb19293cb Lan Tianyu    2014-11-23  2150  	mutex_unlock(&acpi_dep_list_lock);
018f81b667154a Daniel Scally 2021-06-03  2151  
018f81b667154a Daniel Scally 2021-06-03 @2152  	return ret > 0 ? 0 : ret;
40e7fcb19293cb Lan Tianyu    2014-11-23  2153  }
40e7fcb19293cb Lan Tianyu    2014-11-23  2154  EXPORT_SYMBOL_GPL(acpi_walk_dep_device_list);
40e7fcb19293cb Lan Tianyu    2014-11-23  2155  

---
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: 38498 bytes --]

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

end of thread, other threads:[~2021-06-29  7:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27 11:56 [rui:linux-next 9/13] drivers/acpi/scan.c:2152 acpi_walk_dep_device_list() error: uninitialized symbol 'ret' kernel test robot
2021-06-28  9:06 ` Dan Carpenter
2021-06-28 10:04 ` Daniel Scally
2021-06-29  7:27   ` Huang Rui

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.