Re: [PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Yisheng Xie
Hi Andy, On 2018/5/22 5:39, Andy Shevchenko wrote: > On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: >> match_string() returns the index of an array for a matching string, >> which can be used intead of open coded variant. > >> - for (i = 0; i < ARRAY_SIZE(cudbg_region); i++) { >> -

Re: [PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Andy Shevchenko
On Mon, May 21, 2018 at 2:57 PM, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > - for (i = 0; i < ARRAY_SIZE(cudbg_region); i++) { > - if (!strcmp(cudbg_region[i], region_name)) { > -

[PATCH 05/33] cxgb4: use match_string() helper

2018-05-21 Thread Yisheng Xie
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Ganesh Goudar Cc: netdev@vger.kernel.org Signed-off-by: Yisheng Xie --- drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c | 14 -- 1 file changed, 4 insertions(+), 10