Re: [PATCH 2/2] clk: qcom: clk-rpmh: Add QCOM RPMh clock driver

From: Stephen Boyd
Date: Thu May 03 2018 - 13:04:18 EST


Quoting Taniya Das (2018-05-03 03:33:10)
> Hello Stephen,
>
> Thanks for review.
>
> On 5/2/2018 9:00 PM, Stephen Boyd wrote:
> > Quoting Taniya Das (2018-05-02 03:51:17)
> >> + ret = devm_clk_hw_register(&pdev->dev, hw_clks[i]);
> >> + if (ret) {
> >> + dev_err(&pdev->dev, "failed to register %s\n",
> >> + hw_clks[i]->init->name);
> >> + goto err;
> >> + }
> >> +
> >> + rpmh_clk->dev = &pdev->dev;
> >> + }
> >> +
> >> + ret = devm_of_clk_add_hw_provider(&pdev->dev, of_clk_rpmh_hw_get,
> >> + (void *) desc);
> >
> > Drop the void cast.
> >
>
> I see a compiler warning, that is the reason to keep the void cast.
> /include/linux/clk-provider.h:881:5: note: expected âvoid *â but
> argument is of type âconst struct clk_rpmh_desc *â

Ok. Casting away const is not good though. Can you pass a pointer to the
hw_clks array instead?