[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202601210924.Az82DHT4-lkp@intel.com>
Date: Wed, 21 Jan 2026 09:44:55 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-pci@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Bjorn Helgaas <helgaas@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>
Subject: Re: [PATCH v1 1/1] ACPI: PCI: simplify code with
acpi_get_local_u64_address()
Hi Andy,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.19-rc6 next-20260120]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/ACPI-PCI-simplify-code-with-acpi_get_local_u64_address/20260121-004826
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20260120154015.1764021-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] ACPI: PCI: simplify code with acpi_get_local_u64_address()
config: x86_64-randconfig-161-20260121 (https://download.01.org/0day-ci/archive/20260121/202601210924.Az82DHT4-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
smatch version: v0.5.0-8985-g2614ff1a
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260121/202601210924.Az82DHT4-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601210924.Az82DHT4-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/acpi/pci_slot.c: In function 'check_slot':
>> drivers/acpi/pci_slot.c:60:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
60 | if (acpi_get_local_u64_address(handle, &adr))
| ^~
drivers/acpi/pci_slot.c:63:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
63 | goto out;
| ^~~~
drivers/acpi/pci_slot.c:63:17: error: label 'out' used but not defined
>> drivers/acpi/pci_slot.c:44:13: warning: unused variable 'device' [-Wunused-variable]
44 | int device = -1;
| ^~~~~~
>> drivers/acpi/pci_slot.c:64:9: warning: no return statement in function returning non-void [-Wreturn-type]
64 | }
| ^
drivers/acpi/pci_slot.c: At top level:
>> drivers/acpi/pci_slot.c:67:9: warning: data definition has no type or storage class
67 | status = acpi_evaluate_integer(handle, "_SUN", NULL, sun);
| ^~~~~~
drivers/acpi/pci_slot.c:67:9: error: type defaults to 'int' in declaration of 'status' [-Werror=implicit-int]
drivers/acpi/pci_slot.c:67:40: error: 'handle' undeclared here (not in a function)
67 | status = acpi_evaluate_integer(handle, "_SUN", NULL, sun);
| ^~~~~~
drivers/acpi/pci_slot.c:67:62: error: 'sun' undeclared here (not in a function)
67 | status = acpi_evaluate_integer(handle, "_SUN", NULL, sun);
| ^~~
drivers/acpi/pci_slot.c:68:9: error: expected identifier or '(' before 'if'
68 | if (ACPI_FAILURE(status)) {
| ^~
drivers/acpi/pci_slot.c:74:9: warning: data definition has no type or storage class
74 | device = (adr >> 16) & 0xffff;
| ^~~~~~
drivers/acpi/pci_slot.c:74:9: error: type defaults to 'int' in declaration of 'device' [-Werror=implicit-int]
drivers/acpi/pci_slot.c:74:19: error: 'adr' undeclared here (not in a function); did you mean 'idr'?
74 | device = (adr >> 16) & 0xffff;
| ^~~
| idr
drivers/acpi/pci_slot.c:75:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
75 | out:
| ^
drivers/acpi/pci_slot.c:77:9: error: expected identifier or '(' before 'return'
77 | return device;
| ^~~~~~
drivers/acpi/pci_slot.c:78:1: error: expected identifier or '(' before '}' token
78 | }
| ^
cc1: some warnings being treated as errors
vim +/if +60 drivers/acpi/pci_slot.c
40
41 static int
42 check_slot(acpi_handle handle, unsigned long long *sun)
43 {
> 44 int device = -1;
45 unsigned long long sta;
46 acpi_status status;
47 u64 adr;
48 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
49
50 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
51 pr_debug("Checking slot on path: %s\n", (char *)buffer.pointer);
52
53 if (check_sta_before_sun) {
54 /* If SxFy doesn't have _STA, we just assume it's there */
55 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
56 if (ACPI_SUCCESS(status) && !(sta & ACPI_STA_DEVICE_PRESENT))
57 goto out;
58 }
59
> 60 if (acpi_get_local_u64_address(handle, &adr))
61 pr_debug("_ADR returned with failure on %s\n",
62 (char *)buffer.pointer);
> 63 goto out;
> 64 }
65
66 /* No _SUN == not a slot == bail */
> 67 status = acpi_evaluate_integer(handle, "_SUN", NULL, sun);
68 if (ACPI_FAILURE(status)) {
69 pr_debug("_SUN returned %d on %s\n",
70 status, (char *)buffer.pointer);
71 goto out;
72 }
73
74 device = (adr >> 16) & 0xffff;
75 out:
76 kfree(buffer.pointer);
77 return device;
78 }
79
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists