Re: [PATCH 3/8] OPP: Reuse _opp_compare_key() in _opp_add_static_v2()

Viresh Kumar
2022-06-22T14:07:32Z

On 22-06-22, 14:58, Jon Hunter wrote:
> FYI ... if I checkout commit 00d776d33da9 ("OPP: Reuse
> _opp_compare_key() in _opp_add_static_v2()") from next-20220622
> it does not compile ...
>
> drivers/opp/of.c: In function ‘_opp_add_static_v2’:
> drivers/opp/of.c:933:25: error: passing argument 1 of ‘_opp_compare_key’ from incompatible pointer type [-Werror=incompatible-pointer-types]
> if (_opp_compare_key(opp_table, new_opp, opp_table->suspend_opp) == 1) {
> ^~~~~~~~~
> In file included from drivers/opp/of.c:22:0:
> drivers/opp/opp.h:228:5: note: expected ‘struct dev_pm_opp *’ but argument is of type ‘struct opp_table *’
> int _opp_compare_key(struct dev_pm_opp *opp1, struct dev_pm_opp *opp2);
> ^~~~~~~~~~~~~~~~
> drivers/opp/of.c:933:8: error: too many arguments to function ‘_opp_compare_key’
> if (_opp_compare_key(opp_table, new_opp, opp_table->suspend_opp) == 1) {
> ^~~~~~~~~~~~~~~~
> In file included from drivers/opp/of.c:22:0:
> drivers/opp/opp.h:228:5: note: declared here
> int _opp_compare_key(struct dev_pm_opp *opp1, struct dev_pm_opp *opp2);
> ^~~~~~~~~~~~~~~~
>
> This breaks bisecting -next and so would be good to fix this.

Yeah, this was reported yesterday and is already fixed in my branch, along with
few more fixes.

git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/linux-next

It hasn't landed into linux-next/master yet though.

--
viresh