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?

Reply via email to