tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 81e029d5dd0cae934243168eee37ef303ebcce38 commit: c41cf355c959721c7269cc5ee7c6901cb47424a7 [1304/1304] mbox: qcom: add APCS child device for QCS404 config: x86_64-buildonly-randconfig-001-20241122 (https://download.01.org/0day-ci/archive/20241122/202411220931.AgGtoYjF-lkp@i...) 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/20241122/202411220931.AgGtoYjF-lkp@i...)
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/202411220931.AgGtoYjF-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/mailbox/qcom-apcs-ipc-mailbox.c: In function 'qcom_apcs_ipc_probe': drivers/mailbox/qcom-apcs-ipc-mailbox.c:65:35: warning: unused variable 'apcs_clk_match_table' [-Wunused-variable] 65 | const struct of_device_id apcs_clk_match_table[] = { | ^~~~~~~~~~~~~~~~~~~~ drivers/mailbox/qcom-apcs-ipc-mailbox.c: At top level:
drivers/mailbox/qcom-apcs-ipc-mailbox.c:65:35: warning: 'apcs_clk_match_table' defined but not used [-Wunused-const-variable=]
vim +/apcs_clk_match_table +65 drivers/mailbox/qcom-apcs-ipc-mailbox.c
55 56 static int qcom_apcs_ipc_probe(struct platform_device *pdev) 57 { 58 struct qcom_apcs_ipc *apcs; 59 struct regmap *regmap; 60 struct resource *res; 61 unsigned long offset; 62 void __iomem *base; 63 unsigned long i; 64 int ret;
65 const struct of_device_id apcs_clk_match_table[] = {
66 { .compatible = "qcom,msm8916-apcs-kpss-global", }, 67 { .compatible = "qcom,qcs404-apcs-apps-global", }, 68 {} 69 }; 70 71 apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL); 72 if (!apcs) 73 return -ENOMEM; 74 75 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 76 base = devm_ioremap_resource(&pdev->dev, res); 77 if (IS_ERR(base)) 78 return PTR_ERR(base); 79 80 regmap = devm_regmap_init_mmio(&pdev->dev, base, &apcs_regmap_config); 81 if (IS_ERR(regmap)) 82 return PTR_ERR(regmap); 83 84 offset = (unsigned long)of_device_get_match_data(&pdev->dev); 85 86 apcs->regmap = regmap; 87 apcs->offset = offset; 88 89 /* Initialize channel identifiers */ 90 for (i = 0; i < ARRAY_SIZE(apcs->mbox_chans); i++) 91 apcs->mbox_chans[i].con_priv = (void *)i; 92 93 apcs->mbox.dev = &pdev->dev; 94 apcs->mbox.ops = &qcom_apcs_ipc_ops; 95 apcs->mbox.chans = apcs->mbox_chans; 96 apcs->mbox.num_chans = ARRAY_SIZE(apcs->mbox_chans); 97 98 ret = mbox_controller_register(&apcs->mbox); 99 if (ret) { 100 dev_err(&pdev->dev, "failed to register APCS IPC controller\n"); 101 return ret; 102 } 103 104 if (of_match_device(apcs_clk_match_table, &pdev->dev)) { 105 apcs->clk = platform_device_register_data(&pdev->dev, 106 "qcom-apcs-msm8916-clk", 107 -1, NULL, 0); 108 if (IS_ERR(apcs->clk)) 109 dev_err(&pdev->dev, "failed to register APCS clk\n"); 110 } 111 112 platform_set_drvdata(pdev, apcs); 113 114 return 0; 115 } 116