From: kernel test robot <lkp@intel.com>
To: Samuel Holland <samuel@sholland.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Mark Brown <broonie@kernel.org>,
Andre Przywara <andre.przywara@arm.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Chen-Yu Tsai <wens@csie.org>
Subject: [broonie-ci:v5_20240507_wens_regulator_sun20i_add_allwinner_d1_ldos_driver 11/11] drivers/regulator/sun20i-regulator.c:111:9: error: call to undeclared function 'of_device_get_match_data'; ISO C99 and later do not support implicit function declarations
Date: Thu, 9 May 2024 10:51:09 +0800 [thread overview]
Message-ID: <202405091005.QcdWxIfd-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/ci.git v5_20240507_wens_regulator_sun20i_add_allwinner_d1_ldos_driver
head: d76a5d182fa92d5270e5689baa26841f7ac45228
commit: d76a5d182fa92d5270e5689baa26841f7ac45228 [11/11] regulator: sun20i: Add Allwinner D1 LDOs driver
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20240509/202405091005.QcdWxIfd-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 0ab4458df0688955620b72cc2c72a32dffad3615)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240509/202405091005.QcdWxIfd-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/202405091005.QcdWxIfd-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/regulator/sun20i-regulator.c:11:
In file included from include/linux/regulator/driver.h:18:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:21:
In file included from arch/riscv/include/asm/sections.h:9:
In file included from include/linux/mm.h:2208:
include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/regulator/sun20i-regulator.c:111:9: error: call to undeclared function 'of_device_get_match_data'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
111 | data = of_device_get_match_data(dev);
| ^
>> drivers/regulator/sun20i-regulator.c:111:7: error: incompatible integer to pointer conversion assigning to 'const struct sun20i_regulator_data *' from 'int' [-Wint-conversion]
111 | data = of_device_get_match_data(dev);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/sun20i-regulator.c:136:59: error: array has incomplete element type 'const struct of_device_id'
136 | static const struct of_device_id sun20i_regulator_of_match[] = {
| ^
include/linux/device/driver.h:106:15: note: forward declaration of 'struct of_device_id'
106 | const struct of_device_id *of_match_table;
| ^
1 warning and 3 errors generated.
vim +/of_device_get_match_data +111 drivers/regulator/sun20i-regulator.c
103
104 static int sun20i_regulator_probe(struct platform_device *pdev)
105 {
106 const struct sun20i_regulator_data *data;
107 struct device *dev = &pdev->dev;
108 struct regulator_config config;
109 struct regmap *regmap;
110
> 111 data = of_device_get_match_data(dev);
112 if (!data)
113 return -EINVAL;
114
115 regmap = sun20i_regulator_get_regmap(dev);
116 if (IS_ERR(regmap))
117 return dev_err_probe(dev, PTR_ERR(regmap), "Failed to get regmap\n");
118
119 config = (struct regulator_config) {
120 .dev = dev,
121 .regmap = regmap,
122 };
123
124 for (unsigned int i = 0; i < data->ndescs; ++i) {
125 const struct regulator_desc *desc = &data->descs[i];
126 struct regulator_dev *rdev;
127
128 rdev = devm_regulator_register(dev, desc, &config);
129 if (IS_ERR(rdev))
130 return PTR_ERR(rdev);
131 }
132
133 return 0;
134 }
135
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-05-09 2:52 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=202405091005.QcdWxIfd-lkp@intel.com \
--to=lkp@intel.com \
--cc=andre.przywara@arm.com \
--cc=broonie@kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=wens@csie.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