Re: [PATCH 4/8] lib: bitmap: move ERANGE check from set_region to check_region

2021-02-10 Thread Andy Shevchenko
On Tue, Feb 09, 2021 at 05:59:03PM -0500, Paul Gortmaker wrote: > It makes sense to do all the checks in check_region() and not 1/2 > in check_region and 1/2 in set_region. > > Since set_region is called immediately after check_region, the net > effect on runtime is zero, but it gets rid of an if

[PATCH 4/8] lib: bitmap: move ERANGE check from set_region to check_region

2021-02-09 Thread Paul Gortmaker
It makes sense to do all the checks in check_region() and not 1/2 in check_region and 1/2 in set_region. Since set_region is called immediately after check_region, the net effect on runtime is zero, but it gets rid of an if (...) return... Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy

Re: [PATCH 4/8] lib: bitmap: move ERANGE check from set_region to check_region

2021-01-26 Thread Yury Norov
On Tue, Jan 26, 2021 at 9:12 AM Paul Gortmaker wrote: > > It makes sense to do all the checks in check_region() and not 1/2 > in check_region and 1/2 in set_region. > > Since set_region is called immediately after check_region, the net > effect on runtime is zero, but it gets rid of an if (...)

Re: [PATCH 4/8] lib: bitmap: move ERANGE check from set_region to check_region

2021-01-26 Thread Andy Shevchenko
On Tue, Jan 26, 2021 at 12:11:37PM -0500, Paul Gortmaker wrote: > It makes sense to do all the checks in check_region() and not 1/2 > in check_region and 1/2 in set_region. > > Since set_region is called immediately after check_region, the net > effect on runtime is zero, but it gets rid of an if

[PATCH 4/8] lib: bitmap: move ERANGE check from set_region to check_region

2021-01-26 Thread Paul Gortmaker
It makes sense to do all the checks in check_region() and not 1/2 in check_region and 1/2 in set_region. Since set_region is called immediately after check_region, the net effect on runtime is zero, but it gets rid of an if (...) return... Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy