On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyishe...@huawei.com> wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > > Cc: Michael Turquette <mturque...@baylibre.com> > Cc: Stephen Boyd <sb...@kernel.org> > Cc: Eric Anholt <e...@anholt.net> > Cc: Stefan Wahren <stefan.wah...@i2se.com> > Cc: linux-...@vger.kernel.org > Cc: linux-rpi-ker...@lists.infradead.org > Cc: linux-arm-ker...@lists.infradead.org > Signed-off-by: Yisheng Xie <xieyishe...@huawei.com>
> - size_t i, j; > - int ret; > + int i, ret; I do not see any need to change type for i. > + ret = match_string(cprman_parent_names, > + ARRAY_SIZE(cprman_parent_names), > + parents[i]); > + if (ret >= 0) > + parents[i] = cprman->real_parent_names[ret]; -- With Best Regards, Andy Shevchenko