From: kernel test robot <lkp@intel.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [freescale-fslc:5.15-2.2.x-imx 16156/29910] drivers/soc/imx/imx93-blk-ctrl.c:234:21: error: use of undeclared identifier 'SZ_4K'
Date: Sat, 27 Apr 2024 10:22:53 +0800 [thread overview]
Message-ID: <202404271044.0mQkXcG1-lkp@intel.com> (raw)
Hi Peng,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.15-2.2.x-imx
head: ebcdbe7ec49f9c3405ee4b89e7ec279e313026f3
commit: 1c3dd14276374d48bfd2a6d41c712cd0bb04163b [16156/29910] LF-6899 soc: imx: imx93-blk-ctrl: restrict register range with access table
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240427/202404271044.0mQkXcG1-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 5ef5eb66fb428aaf61fb51b709f065c069c11242)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240427/202404271044.0mQkXcG1-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/202404271044.0mQkXcG1-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/soc/imx/imx93-blk-ctrl.c:234:21: error: use of undeclared identifier 'SZ_4K'
234 | .max_register = SZ_4K,
| ^
1 error generated.
vim +/SZ_4K +234 drivers/soc/imx/imx93-blk-ctrl.c
218
219 static int imx93_blk_ctrl_probe(struct platform_device *pdev)
220 {
221 struct device *dev = &pdev->dev;
222 const struct imx93_blk_ctrl_data *bc_data = of_device_get_match_data(dev);
223 const struct imx93_blk_ctrl_domain_data *bus = bc_data->bus;
224 struct imx93_blk_ctrl *bc;
225 void __iomem *base;
226 int i, ret;
227
228 struct regmap_config regmap_config = {
229 .reg_bits = 32,
230 .val_bits = 32,
231 .reg_stride = 4,
232 .rd_table = bus->reg_access_table,
233 .wr_table = bus->reg_access_table,
> 234 .max_register = SZ_4K,
235 };
236
237 bc = devm_kzalloc(dev, sizeof(*bc), GFP_KERNEL);
238 if (!bc)
239 return -ENOMEM;
240
241 bc->dev = dev;
242
243 base = devm_platform_ioremap_resource(pdev, 0);
244 if (IS_ERR(base))
245 return PTR_ERR(base);
246
247 bc->regmap = devm_regmap_init_mmio(dev, base, ®map_config);
248 if (IS_ERR(bc->regmap))
249 return dev_err_probe(dev, PTR_ERR(bc->regmap),
250 "failed to init regmap\n");
251
252 bc->domains = devm_kcalloc(dev, bc_data->num_domains + 1,
253 sizeof(struct imx93_blk_ctrl_domain),
254 GFP_KERNEL);
255 if (!bc->domains)
256 return -ENOMEM;
257
258 bc->onecell_data.num_domains = bc_data->num_domains;
259 bc->onecell_data.xlate = imx93_blk_ctrl_xlate;
260 bc->onecell_data.domains =
261 devm_kcalloc(dev, bc_data->num_domains,
262 sizeof(struct generic_pm_domain *), GFP_KERNEL);
263 if (!bc->onecell_data.domains)
264 return -ENOMEM;
265
266 for (i = 0; i < bus->num_clks; i++)
267 bc->clks[i].id = bus->clk_names[i];
268 bc->num_clks = bus->num_clks;
269
270 ret = devm_clk_bulk_get(dev, bc->num_clks, bc->clks);
271 if (ret) {
272 dev_err_probe(dev, ret, "failed to get bus clock\n");
273 return ret;
274 }
275
276 for (i = 0; i < bc_data->num_domains; i++) {
277 const struct imx93_blk_ctrl_domain_data *data = &bc_data->domains[i];
278 struct imx93_blk_ctrl_domain *domain = &bc->domains[i];
279 int j;
280
281 domain->data = data;
282
283 for (j = 0; j < data->num_clks; j++)
284 domain->clks[j].id = data->clk_names[j];
285
286 ret = devm_clk_bulk_get(dev, data->num_clks, domain->clks);
287 if (ret) {
288 dev_err_probe(dev, ret, "failed to get clock\n");
289 goto cleanup_pds;
290 }
291
292 domain->genpd.name = data->name;
293 domain->genpd.power_on = imx93_blk_ctrl_power_on;
294 domain->genpd.power_off = imx93_blk_ctrl_power_off;
295 domain->bc = bc;
296
297 ret = pm_genpd_init(&domain->genpd, NULL, true);
298 if (ret) {
299 dev_err_probe(dev, ret, "failed to init power domain\n");
300 goto cleanup_pds;
301 }
302
303 bc->onecell_data.domains[i] = &domain->genpd;
304 }
305
306 pm_runtime_enable(dev);
307
308 ret = of_genpd_add_provider_onecell(dev->of_node, &bc->onecell_data);
309 if (ret) {
310 dev_err_probe(dev, ret, "failed to add power domain provider\n");
311 goto cleanup_pds;
312 }
313
314
315 dev_set_drvdata(dev, bc);
316
317 return 0;
318
319 cleanup_pds:
320 for (i--; i >= 0; i--)
321 pm_genpd_remove(&bc->domains[i].genpd);
322
323 return ret;
324 }
325
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-04-27 2:23 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=202404271044.0mQkXcG1-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=otavio@ossystems.com.br \
/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 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.