Message ID | 1590583092-24290-4-git-send-email-sivaprak@codeaurora.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Add ipq6018 apcs mailbox driver | expand |
Hi Sivaprakash, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on linus/master v5.7-rc7 next-20200528] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Sivaprakash-Murugesan/Add-ipq6018-apcs-mailbox-driver/20200527-204025 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: x86_64-randconfig-a004-20200528 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2d068e534f1671459e1b135852c1b3c10502e929) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com> All warnings (new ones prefixed by >>, old ones prefixed by <<): >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:48:34: warning: unused variable 'apcs_clk_match_table' [-Wunused-const-variable] static const struct of_device_id apcs_clk_match_table[] = { ^ 1 warning generated. vim +/apcs_clk_match_table +48 drivers/mailbox/qcom-apcs-ipc-mailbox.c 47 > 48 static const struct of_device_id apcs_clk_match_table[] = { 49 { .compatible = "qcom,ipq6018-apcs-apps-global", .data = "qcom,apss-ipq6018-clk", }, 50 { .compatible = "qcom,msm8916-apcs-kpss-global", .data = "qcom-apcs-msm8916-clk", }, 51 { .compatible = "qcom,qcs404-apcs-apps-global", .data = "qcom-apcs-msm8916-clk", }, 52 {} 53 }; 54 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
On Wed 27 May 05:38 PDT 2020, Sivaprakash Murugesan wrote: > The Qualcomm ipq6018 has apcs block, add compatible for the same. > Also, the apcs provides a clock controller functionality similar > to msm8916 but the clock driver is different. > > Create a child platform device based on the apcs compatible for the > clock controller functionality. > > Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org> > --- > drivers/mailbox/qcom-apcs-ipc-mailbox.c | 23 ++++++++++++++--------- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c > index eeebafd..db3f9518 100644 > --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c > +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c > @@ -45,6 +45,13 @@ static const struct mbox_chan_ops qcom_apcs_ipc_ops = { > .send_data = qcom_apcs_ipc_send_data, > }; > > +static const struct of_device_id apcs_clk_match_table[] = { > + { .compatible = "qcom,ipq6018-apcs-apps-global", .data = "qcom,apss-ipq6018-clk", }, > + { .compatible = "qcom,msm8916-apcs-kpss-global", .data = "qcom-apcs-msm8916-clk", }, > + { .compatible = "qcom,qcs404-apcs-apps-global", .data = "qcom-apcs-msm8916-clk", }, > + {} > +}; > + > static int qcom_apcs_ipc_probe(struct platform_device *pdev) > { > struct qcom_apcs_ipc *apcs; > @@ -54,11 +61,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) > void __iomem *base; > unsigned long i; > int ret; > - const struct of_device_id apcs_clk_match_table[] = { > - { .compatible = "qcom,msm8916-apcs-kpss-global", }, > - { .compatible = "qcom,qcs404-apcs-apps-global", }, > - {} > - }; > + const struct of_device_id *clk_device; > > apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL); > if (!apcs) > @@ -93,11 +96,12 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) > return ret; > } > > - if (of_match_device(apcs_clk_match_table, &pdev->dev)) { > + clk_device = of_match_device(apcs_clk_match_table, &pdev->dev); I think you should replace the direct integer in qcom_apcs_ipc_of_match with a small struct containing offset and the clock device's name - allowing the latter to be omitted. That avoids the apcs_clk_match_table being unreferenced when this is compiled without CONFIG_OF and it removes the need for two of_device_id arrays. Regards, Bjorn > + if (clk_device) { > apcs->clk = platform_device_register_data(&pdev->dev, > - "qcom-apcs-msm8916-clk", > - PLATFORM_DEVID_NONE, > - NULL, 0); > + clk_device->data, > + PLATFORM_DEVID_NONE, > + NULL, 0); > if (IS_ERR(apcs->clk)) > dev_err(&pdev->dev, "failed to register APCS clk\n"); > } > @@ -126,6 +130,7 @@ static const struct of_device_id qcom_apcs_ipc_of_match[] = { > { .compatible = "qcom,sc7180-apss-shared", .data = (void *)12 }, > { .compatible = "qcom,sdm845-apss-shared", .data = (void *)12 }, > { .compatible = "qcom,sm8150-apss-shared", .data = (void *)12 }, > + { .compatible = "qcom,ipq6018-apcs-apps-global", .data = (void *)8 }, > { .compatible = "qcom,ipq8074-apcs-apps-global", .data = (void *)8 }, > {} > }; > -- > 2.7.4 >
diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index eeebafd..db3f9518 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -45,6 +45,13 @@ static const struct mbox_chan_ops qcom_apcs_ipc_ops = { .send_data = qcom_apcs_ipc_send_data, }; +static const struct of_device_id apcs_clk_match_table[] = { + { .compatible = "qcom,ipq6018-apcs-apps-global", .data = "qcom,apss-ipq6018-clk", }, + { .compatible = "qcom,msm8916-apcs-kpss-global", .data = "qcom-apcs-msm8916-clk", }, + { .compatible = "qcom,qcs404-apcs-apps-global", .data = "qcom-apcs-msm8916-clk", }, + {} +}; + static int qcom_apcs_ipc_probe(struct platform_device *pdev) { struct qcom_apcs_ipc *apcs; @@ -54,11 +61,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) void __iomem *base; unsigned long i; int ret; - const struct of_device_id apcs_clk_match_table[] = { - { .compatible = "qcom,msm8916-apcs-kpss-global", }, - { .compatible = "qcom,qcs404-apcs-apps-global", }, - {} - }; + const struct of_device_id *clk_device; apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL); if (!apcs) @@ -93,11 +96,12 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) return ret; } - if (of_match_device(apcs_clk_match_table, &pdev->dev)) { + clk_device = of_match_device(apcs_clk_match_table, &pdev->dev); + if (clk_device) { apcs->clk = platform_device_register_data(&pdev->dev, - "qcom-apcs-msm8916-clk", - PLATFORM_DEVID_NONE, - NULL, 0); + clk_device->data, + PLATFORM_DEVID_NONE, + NULL, 0); if (IS_ERR(apcs->clk)) dev_err(&pdev->dev, "failed to register APCS clk\n"); } @@ -126,6 +130,7 @@ static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible = "qcom,sc7180-apss-shared", .data = (void *)12 }, { .compatible = "qcom,sdm845-apss-shared", .data = (void *)12 }, { .compatible = "qcom,sm8150-apss-shared", .data = (void *)12 }, + { .compatible = "qcom,ipq6018-apcs-apps-global", .data = (void *)8 }, { .compatible = "qcom,ipq8074-apcs-apps-global", .data = (void *)8 }, {} };
The Qualcomm ipq6018 has apcs block, add compatible for the same. Also, the apcs provides a clock controller functionality similar to msm8916 but the clock driver is different. Create a child platform device based on the apcs compatible for the clock controller functionality. Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org> --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)