[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vf6rDpFQCt+qG3DSWKZm36F1hkAVPtGzr6NHPuQg4vhXQ@mail.gmail.com>
Date: Tue, 22 May 2018 00:50:23 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Yisheng Xie <xieyisheng1@...wei.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Eric Anholt <eric@...olt.net>,
Stefan Wahren <stefan.wahren@...e.com>,
linux-clk@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 12/33] clk: bcm2835: use match_string() helper
On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie <xieyisheng1@...wei.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 <mturquette@...libre.com>
> Cc: Stephen Boyd <sboyd@...nel.org>
> Cc: Eric Anholt <eric@...olt.net>
> Cc: Stefan Wahren <stefan.wahren@...e.com>
> Cc: linux-clk@...r.kernel.org
> Cc: linux-rpi-kernel@...ts.infradead.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Signed-off-by: Yisheng Xie <xieyisheng1@...wei.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
Powered by blists - more mailing lists