Re: [PATCH v2] lib/btree.c: optimise the code by previously getpos function

2017-05-12 Thread Andrew Morton
On Thu, 11 May 2017 17:42:21 +0800 Leno Hou wrote: > This patch optimized the code by previously getpos function call. > Therefore, It's takes the convenience to understand logic of code. I would rewrite this changelog to read : Rework the getpos() helper function and use it to remove various :

Re: [PATCH v2] lib/btree.c: optimise the code by previously getpos function

2017-05-11 Thread Andy Shevchenko
On Thu, May 11, 2017 at 12:42 PM, Leno Hou wrote: > This patch optimized the code by previously getpos function call. > Therefore, It's takes the convenience to understand logic of code. > > v2: > - getpos() returns errorno if not found the key > > v1: > - cleanup code by using getpos() FWIW:

[PATCH v2] lib/btree.c: optimise the code by previously getpos function

2017-05-11 Thread Leno Hou
This patch optimized the code by previously getpos function call. Therefore, It's takes the convenience to understand logic of code. v2: - getpos() returns errorno if not found the key v1: - cleanup code by using getpos() Signed-off-by: Leno Hou --- lib/btree.c | 50 +--