From: kernel test robot <lkp@intel.com>
To: Lizhi Hou <lizhi.hou@amd.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Rob Herring <robh@kernel.org>
Subject: [linux-next:master 11860/12910] drivers/of/unittest.c:3763:43: error: invalid use of undefined type 'struct overlay_info'
Date: Sat, 26 Aug 2023 03:05:48 +0800 [thread overview]
Message-ID: <202308260218.hAEW63gz-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6269320850097903b30be8f07a5c61d9f7592393
commit: 26409dd045892904b059dc411403e9c8ce7543ca [11860/12910] of: unittest: Add pci_dt_testdrv pci driver
config: alpha-randconfig-r006-20230826 (https://download.01.org/0day-ci/archive/20230826/202308260218.hAEW63gz-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230826/202308260218.hAEW63gz-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/202308260218.hAEW63gz-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/of/unittest.c: In function 'testdrv_probe':
drivers/of/unittest.c:3763:21: error: 'overlays' undeclared (first use in this function)
3763 | for (info = overlays; info && info->name; info++) {
| ^~~~~~~~
drivers/of/unittest.c:3763:21: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/of/unittest.c:3763:43: error: invalid use of undefined type 'struct overlay_info'
3763 | for (info = overlays; info && info->name; info++) {
| ^~
drivers/of/unittest.c:3763:55: error: increment of pointer to an incomplete type 'struct overlay_info'
3763 | for (info = overlays; info && info->name; info++) {
| ^~
drivers/of/unittest.c:3764:33: error: invalid use of undefined type 'struct overlay_info'
3764 | if (!strcmp(info->name, "overlay_pci_node"))
| ^~
drivers/of/unittest.c:3767:27: error: invalid use of undefined type 'struct overlay_info'
3767 | if (!info || !info->name) {
| ^~
drivers/of/unittest.c:3772:20: error: invalid use of undefined type 'struct overlay_info'
3772 | size = info->dtbo_end - info->dtbo_begin;
| ^~
drivers/of/unittest.c:3772:37: error: invalid use of undefined type 'struct overlay_info'
3772 | size = info->dtbo_end - info->dtbo_begin;
| ^~
drivers/of/unittest.c:3773:40: error: invalid use of undefined type 'struct overlay_info'
3773 | ret = of_overlay_fdt_apply(info->dtbo_begin, size, &ovcs_id, dn);
| ^~
drivers/of/unittest.c:3773:15: error: too many arguments to function 'of_overlay_fdt_apply'
3773 | ret = of_overlay_fdt_apply(info->dtbo_begin, size, &ovcs_id, dn);
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/of/unittest.c:15:
include/linux/of.h:1679:19: note: declared here
1679 | static inline int of_overlay_fdt_apply(void *overlay_fdt, u32 overlay_fdt_size,
| ^~~~~~~~~~~~~~~~~~~~
vim +3763 drivers/of/unittest.c
3749
3750 static int testdrv_probe(struct pci_dev *pdev, const struct pci_device_id *id)
3751 {
3752 struct overlay_info *info;
3753 struct device_node *dn;
3754 int ret, ovcs_id;
3755 u32 size;
3756
3757 dn = pdev->dev.of_node;
3758 if (!dn) {
3759 dev_err(&pdev->dev, "does not find bus endpoint");
3760 return -EINVAL;
3761 }
3762
> 3763 for (info = overlays; info && info->name; info++) {
3764 if (!strcmp(info->name, "overlay_pci_node"))
3765 break;
3766 }
3767 if (!info || !info->name) {
3768 dev_err(&pdev->dev, "no overlay data for overlay_pci_node");
3769 return -ENODEV;
3770 }
3771
3772 size = info->dtbo_end - info->dtbo_begin;
3773 ret = of_overlay_fdt_apply(info->dtbo_begin, size, &ovcs_id, dn);
3774 of_node_put(dn);
3775 if (ret)
3776 return ret;
3777
3778 of_platform_default_populate(dn, NULL, &pdev->dev);
3779 pci_set_drvdata(pdev, (void *)(uintptr_t)ovcs_id);
3780
3781 return 0;
3782 }
3783
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-08-25 19:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202308260218.hAEW63gz-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--cc=lizhi.hou@amd.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).