On Tue, May 22, 2018 at 3:10 PM, Yisheng Xie <xieyishe...@huawei.com> wrote:
>>> + i = match_string(sched_feat_names, __SCHED_FEAT_NR, cmp); >>> + if (i >= 0) { >> >> Why not >> >> if (i < 0) >> return i; > > if i >=0 it will also return i. so need return i just if (i < 0), right ? Looking to the only (modified) caller, I think yes, either you return error code or just 0. >>> - if (i == __SCHED_FEAT_NR) >>> + if (i < 0) >>> return -EINVAL; >> >> Now it would be >> >> if (i < 0) ...even if (i) and rename i to ret to show the change in returned value meaning. >> return i; > > Right, will change it in next version -- With Best Regards, Andy Shevchenko