* [openeuler:OLK-6.6 3214/3214] drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:779:20: error: incomplete definition of type 'struct acpi_device'
@ 2025-11-17 20:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-17 20:44 UTC (permalink / raw)
To: kernel; +Cc: oe-kbuild-all
Hi LeoLiu-oc,
First bad commit (maybe != root cause):
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 17cadcdf512f891675c3c9df62bcf05511293ae9
commit: 5d01c9ec4f3b95b0629a38d936f69bc05e494cc9 [3214/3214] pinctrl: Zhaoxin: Add KH-50000 support
config: x86_64-buildonly-randconfig-004-20251118 (https://download.01.org/0day-ci/archive/20251118/202511180448.bJpcAwU9-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251118/202511180448.bJpcAwU9-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511180448.bJpcAwU9-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:123:6: warning: variable 'value_back' set but not used [-Wunused-but-set-variable]
123 | u16 value_back = 0;
| ^
drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:249:6: warning: variable 'pin' set but not used [-Wunused-but-set-variable]
249 | int pin;
| ^
drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:270:6: warning: variable 'pin' set but not used [-Wunused-but-set-variable]
270 | int pin;
| ^
drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:330:6: warning: variable 'base_offset' set but not used [-Wunused-but-set-variable]
330 | int base_offset = 0;
| ^
drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:363:6: warning: variable 'base_offset' set but not used [-Wunused-but-set-variable]
363 | int base_offset = 0;
| ^
drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:487:6: warning: variable 'test_mask' set but not used [-Wunused-but-set-variable]
487 | u16 test_mask;
| ^
>> drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:779:20: error: incomplete definition of type 'struct acpi_device'
779 | if (!strcmp(adev->pnp.unique_id, table[i]->uid)) {
| ~~~~^
include/linux/compiler.h:55:47: note: expanded from macro 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~
include/linux/compiler.h:57:52: note: expanded from macro '__trace_if_var'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/acpi.h:798:8: note: forward declaration of 'struct acpi_device'
798 | struct acpi_device;
| ^
>> drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:779:20: error: incomplete definition of type 'struct acpi_device'
779 | if (!strcmp(adev->pnp.unique_id, table[i]->uid)) {
| ~~~~^
include/linux/compiler.h:55:47: note: expanded from macro 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~
include/linux/compiler.h:57:61: note: expanded from macro '__trace_if_var'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/acpi.h:798:8: note: forward declaration of 'struct acpi_device'
798 | struct acpi_device;
| ^
>> drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:779:20: error: incomplete definition of type 'struct acpi_device'
779 | if (!strcmp(adev->pnp.unique_id, table[i]->uid)) {
| ~~~~^
include/linux/compiler.h:55:47: note: expanded from macro 'if'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~
include/linux/compiler.h:57:86: note: expanded from macro '__trace_if_var'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
include/linux/compiler.h:68:3: note: expanded from macro '__trace_if_value'
68 | (cond) ? \
| ^~~~
include/linux/acpi.h:798:8: note: forward declaration of 'struct acpi_device'
798 | struct acpi_device;
| ^
6 warnings and 3 errors generated.
vim +779 drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c
996e18349e58a3 leoliu-oc 2024-02-04 765
996e18349e58a3 leoliu-oc 2024-02-04 766 const struct zhaoxin_pinctrl_soc_data *zhaoxin_pinctrl_get_soc_data(struct platform_device *pdev)
996e18349e58a3 leoliu-oc 2024-02-04 767 {
996e18349e58a3 leoliu-oc 2024-02-04 768 const struct zhaoxin_pinctrl_soc_data *data = NULL;
996e18349e58a3 leoliu-oc 2024-02-04 769 const struct zhaoxin_pinctrl_soc_data **table;
996e18349e58a3 leoliu-oc 2024-02-04 770 struct acpi_device *adev;
996e18349e58a3 leoliu-oc 2024-02-04 771 unsigned int i;
996e18349e58a3 leoliu-oc 2024-02-04 772
996e18349e58a3 leoliu-oc 2024-02-04 773 adev = ACPI_COMPANION(&pdev->dev);
996e18349e58a3 leoliu-oc 2024-02-04 774 if (adev) {
996e18349e58a3 leoliu-oc 2024-02-04 775 const void *match = device_get_match_data(&pdev->dev);
996e18349e58a3 leoliu-oc 2024-02-04 776
996e18349e58a3 leoliu-oc 2024-02-04 777 table = (const struct zhaoxin_pinctrl_soc_data **)match;
996e18349e58a3 leoliu-oc 2024-02-04 778 for (i = 0; table[i]; i++) {
996e18349e58a3 leoliu-oc 2024-02-04 @779 if (!strcmp(adev->pnp.unique_id, table[i]->uid)) {
996e18349e58a3 leoliu-oc 2024-02-04 780 data = table[i];
996e18349e58a3 leoliu-oc 2024-02-04 781 break;
996e18349e58a3 leoliu-oc 2024-02-04 782 }
996e18349e58a3 leoliu-oc 2024-02-04 783 }
996e18349e58a3 leoliu-oc 2024-02-04 784 } else {
996e18349e58a3 leoliu-oc 2024-02-04 785 const struct platform_device_id *id;
996e18349e58a3 leoliu-oc 2024-02-04 786
996e18349e58a3 leoliu-oc 2024-02-04 787 id = platform_get_device_id(pdev);
996e18349e58a3 leoliu-oc 2024-02-04 788 if (!id)
996e18349e58a3 leoliu-oc 2024-02-04 789 return ERR_PTR(-ENODEV);
996e18349e58a3 leoliu-oc 2024-02-04 790
996e18349e58a3 leoliu-oc 2024-02-04 791 table = (const struct zhaoxin_pinctrl_soc_data **)id->driver_data;
996e18349e58a3 leoliu-oc 2024-02-04 792 data = table[pdev->id];
996e18349e58a3 leoliu-oc 2024-02-04 793 }
996e18349e58a3 leoliu-oc 2024-02-04 794
996e18349e58a3 leoliu-oc 2024-02-04 795 return data ?: ERR_PTR(-ENODATA);
996e18349e58a3 leoliu-oc 2024-02-04 796 }
996e18349e58a3 leoliu-oc 2024-02-04 797 EXPORT_SYMBOL_GPL(zhaoxin_pinctrl_get_soc_data);
996e18349e58a3 leoliu-oc 2024-02-04 798
:::::: The code at line 779 was first introduced by commit
:::::: 996e18349e58a3ace519f9c0f32f4e62fc46ec2c Add support Zhaoxin GPIO pinctrl
:::::: TO: leoliu-oc <leoliu-oc@zhaoxin.com>
:::::: CC: leoliu-oc <leoliu-oc@zhaoxin.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-17 20:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17 20:44 [openeuler:OLK-6.6 3214/3214] drivers/pinctrl/zhaoxin/pinctrl-zhaoxin.c:779:20: error: incomplete definition of type 'struct acpi_device' kernel test robot
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.