[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202501121029.AZEll6tS-lkp@intel.com>
Date: Sun, 12 Jan 2025 10:26:09 +0800
From: kernel test robot <lkp@...el.com>
To: Konrad Dybcio <konradybcio@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Stephen Boyd <sboyd@...nel.org>,
Joe Hattori <joe@...is.s.u-tokyo.ac.jp>
Cc: oe-kbuild-all@...ts.linux.dev, linux-media@...r.kernel.org,
Marijn Suijten <marijn.suijten@...ainline.org>,
linux-kernel@...r.kernel.org,
Bjorn Andersson <andersson@...nel.org>,
Abel Vesa <abel.vesa@...aro.org>,
Johan Hovold <johan+linaro@...nel.org>,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Subject: Re: [PATCH] spmi: Fix controller->node != parent->node breakage
Hi Konrad,
kernel test robot noticed the following build errors:
[auto build test ERROR on 2b88851f583d3c4e40bcd40cfe1965241ec229dd]
url: https://github.com/intel-lab-lkp/linux/commits/Konrad-Dybcio/spmi-Fix-controller-node-parent-node-breakage/20250111-192215
base: 2b88851f583d3c4e40bcd40cfe1965241ec229dd
patch link: https://lore.kernel.org/r/20250111-topic-spmi_node_breakage-v1-1-3f60111a1d19%40oss.qualcomm.com
patch subject: [PATCH] spmi: Fix controller->node != parent->node breakage
config: i386-buildonly-randconfig-001-20250112 (https://download.01.org/0day-ci/archive/20250112/202501121029.AZEll6tS-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250112/202501121029.AZEll6tS-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/202501121029.AZEll6tS-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/spmi/spmi-mtk-pmif.c: In function 'mtk_spmi_probe':
>> drivers/spmi/spmi-mtk-pmif.c:456:55: warning: passing argument 2 of 'devm_spmi_controller_alloc' makes pointer from integer without a cast [-Wint-conversion]
456 | ctrl = devm_spmi_controller_alloc(&pdev->dev, sizeof(*arb));
| ^~~~~~~~~~~~
| |
| unsigned int
In file included from drivers/spmi/spmi-mtk-pmif.c:11:
include/linux/spmi.h:125:72: note: expected 'struct device_node *' but argument is of type 'unsigned int'
125 | struct device_node *node,
| ~~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/spmi/spmi-mtk-pmif.c:456:16: error: too few arguments to function 'devm_spmi_controller_alloc'
456 | ctrl = devm_spmi_controller_alloc(&pdev->dev, sizeof(*arb));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/spmi.h:124:25: note: declared here
124 | struct spmi_controller *devm_spmi_controller_alloc(struct device *parent,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
--
drivers/spmi/hisi-spmi-controller.c: In function 'spmi_controller_probe':
>> drivers/spmi/hisi-spmi-controller.c:271:60: error: expected ')' before 'sizeof'
271 | pdev->dev.of_node
| ^
| )
272 | sizeof(*spmi_controller));
| ~~~~~~
drivers/spmi/hisi-spmi-controller.c:270:42: note: to match this '('
270 | ctrl = devm_spmi_controller_alloc(&pdev->dev,
| ^
>> drivers/spmi/hisi-spmi-controller.c:270:16: error: too few arguments to function 'devm_spmi_controller_alloc'
270 | ctrl = devm_spmi_controller_alloc(&pdev->dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/spmi/hisi-spmi-controller.c:13:
include/linux/spmi.h:124:25: note: declared here
124 | struct spmi_controller *devm_spmi_controller_alloc(struct device *parent,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/devm_spmi_controller_alloc +456 drivers/spmi/spmi-mtk-pmif.c
504eb71e4717ddf James Lo 2021-12-16 448
b45b3ccef8c063d James Lo 2021-12-16 449 static int mtk_spmi_probe(struct platform_device *pdev)
b45b3ccef8c063d James Lo 2021-12-16 450 {
b45b3ccef8c063d James Lo 2021-12-16 451 struct pmif *arb;
b45b3ccef8c063d James Lo 2021-12-16 452 struct spmi_controller *ctrl;
b45b3ccef8c063d James Lo 2021-12-16 453 int err, i;
b45b3ccef8c063d James Lo 2021-12-16 454 u32 chan_offset;
b45b3ccef8c063d James Lo 2021-12-16 455
ffdfbafdc4f46a9 Fei Shao 2023-12-06 @456 ctrl = devm_spmi_controller_alloc(&pdev->dev, sizeof(*arb));
ffdfbafdc4f46a9 Fei Shao 2023-12-06 457 if (IS_ERR(ctrl))
ffdfbafdc4f46a9 Fei Shao 2023-12-06 458 return PTR_ERR(ctrl);
b45b3ccef8c063d James Lo 2021-12-16 459
b45b3ccef8c063d James Lo 2021-12-16 460 arb = spmi_controller_get_drvdata(ctrl);
b45b3ccef8c063d James Lo 2021-12-16 461 arb->data = device_get_match_data(&pdev->dev);
b45b3ccef8c063d James Lo 2021-12-16 462 if (!arb->data) {
b45b3ccef8c063d James Lo 2021-12-16 463 dev_err(&pdev->dev, "Cannot get drv_data\n");
ffdfbafdc4f46a9 Fei Shao 2023-12-06 464 return -EINVAL;
b45b3ccef8c063d James Lo 2021-12-16 465 }
b45b3ccef8c063d James Lo 2021-12-16 466
b45b3ccef8c063d James Lo 2021-12-16 467 arb->base = devm_platform_ioremap_resource_byname(pdev, "pmif");
ffdfbafdc4f46a9 Fei Shao 2023-12-06 468 if (IS_ERR(arb->base))
ffdfbafdc4f46a9 Fei Shao 2023-12-06 469 return PTR_ERR(arb->base);
b45b3ccef8c063d James Lo 2021-12-16 470
b45b3ccef8c063d James Lo 2021-12-16 471 arb->spmimst_base = devm_platform_ioremap_resource_byname(pdev, "spmimst");
ffdfbafdc4f46a9 Fei Shao 2023-12-06 472 if (IS_ERR(arb->spmimst_base))
ffdfbafdc4f46a9 Fei Shao 2023-12-06 473 return PTR_ERR(arb->spmimst_base);
b45b3ccef8c063d James Lo 2021-12-16 474
b45b3ccef8c063d James Lo 2021-12-16 475 arb->nclks = ARRAY_SIZE(pmif_clock_names);
b45b3ccef8c063d James Lo 2021-12-16 476 for (i = 0; i < arb->nclks; i++)
b45b3ccef8c063d James Lo 2021-12-16 477 arb->clks[i].id = pmif_clock_names[i];
b45b3ccef8c063d James Lo 2021-12-16 478
e821d50ab5b956e Yu-Che Cheng 2023-12-06 479 err = clk_bulk_get(&pdev->dev, arb->nclks, arb->clks);
b45b3ccef8c063d James Lo 2021-12-16 480 if (err) {
b45b3ccef8c063d James Lo 2021-12-16 481 dev_err(&pdev->dev, "Failed to get clocks: %d\n", err);
ffdfbafdc4f46a9 Fei Shao 2023-12-06 482 return err;
b45b3ccef8c063d James Lo 2021-12-16 483 }
b45b3ccef8c063d James Lo 2021-12-16 484
b45b3ccef8c063d James Lo 2021-12-16 485 err = clk_bulk_prepare_enable(arb->nclks, arb->clks);
b45b3ccef8c063d James Lo 2021-12-16 486 if (err) {
b45b3ccef8c063d James Lo 2021-12-16 487 dev_err(&pdev->dev, "Failed to enable clocks: %d\n", err);
e821d50ab5b956e Yu-Che Cheng 2023-12-06 488 goto err_put_clks;
b45b3ccef8c063d James Lo 2021-12-16 489 }
b45b3ccef8c063d James Lo 2021-12-16 490
b45b3ccef8c063d James Lo 2021-12-16 491 ctrl->cmd = pmif_arb_cmd;
b45b3ccef8c063d James Lo 2021-12-16 492 ctrl->read_cmd = pmif_spmi_read_cmd;
b45b3ccef8c063d James Lo 2021-12-16 493 ctrl->write_cmd = pmif_spmi_write_cmd;
b45b3ccef8c063d James Lo 2021-12-16 494
b45b3ccef8c063d James Lo 2021-12-16 495 chan_offset = PMIF_CHAN_OFFSET * arb->data->soc_chan;
b45b3ccef8c063d James Lo 2021-12-16 496 arb->chan.ch_sta = PMIF_SWINF_0_STA + chan_offset;
b45b3ccef8c063d James Lo 2021-12-16 497 arb->chan.wdata = PMIF_SWINF_0_WDATA_31_0 + chan_offset;
b45b3ccef8c063d James Lo 2021-12-16 498 arb->chan.rdata = PMIF_SWINF_0_RDATA_31_0 + chan_offset;
b45b3ccef8c063d James Lo 2021-12-16 499 arb->chan.ch_send = PMIF_SWINF_0_ACC + chan_offset;
b45b3ccef8c063d James Lo 2021-12-16 500 arb->chan.ch_rdy = PMIF_SWINF_0_VLD_CLR + chan_offset;
b45b3ccef8c063d James Lo 2021-12-16 501
f200fff8d019f27 NĂcolas F. R. A. Prado 2023-12-06 502 raw_spin_lock_init(&arb->lock);
f200fff8d019f27 NĂcolas F. R. A. Prado 2023-12-06 503
b45b3ccef8c063d James Lo 2021-12-16 504 platform_set_drvdata(pdev, ctrl);
b45b3ccef8c063d James Lo 2021-12-16 505
b45b3ccef8c063d James Lo 2021-12-16 506 err = spmi_controller_add(ctrl);
b45b3ccef8c063d James Lo 2021-12-16 507 if (err)
b45b3ccef8c063d James Lo 2021-12-16 508 goto err_domain_remove;
b45b3ccef8c063d James Lo 2021-12-16 509
b45b3ccef8c063d James Lo 2021-12-16 510 return 0;
b45b3ccef8c063d James Lo 2021-12-16 511
b45b3ccef8c063d James Lo 2021-12-16 512 err_domain_remove:
b45b3ccef8c063d James Lo 2021-12-16 513 clk_bulk_disable_unprepare(arb->nclks, arb->clks);
e821d50ab5b956e Yu-Che Cheng 2023-12-06 514 err_put_clks:
e821d50ab5b956e Yu-Che Cheng 2023-12-06 515 clk_bulk_put(arb->nclks, arb->clks);
b45b3ccef8c063d James Lo 2021-12-16 516 return err;
b45b3ccef8c063d James Lo 2021-12-16 517 }
b45b3ccef8c063d James Lo 2021-12-16 518
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists