Re: [PATCH v9 06/10] math.h: Add macros for rounding to closest value

2024-05-29 Thread Andy Shevchenko
On Tue, May 28, 2024 at 04:02:30PM +0530, Devarsh Thakkar wrote: > On 28/05/24 02:02, Andy Shevchenko wrote: > > On Sun, May 26, 2024 at 11:38:56PM +0530, Devarsh Thakkar wrote: ... > >> +/** > >> + * round_closest_up - round closest to be multiple of specified value > >> (which is > >> + *

Re: [PATCH v9 06/10] math.h: Add macros for rounding to closest value

2024-05-28 Thread Devarsh Thakkar
Hi Andy, Thanks for the review. On 28/05/24 02:02, Andy Shevchenko wrote: > On Sun, May 26, 2024 at 11:38:56PM +0530, Devarsh Thakkar wrote: ... >> +/** >> + * round_closest_up - round closest to be multiple of specified value >> (which is >> + *power of 2) with preference

Re: [PATCH v9 06/10] math.h: Add macros for rounding to closest value

2024-05-27 Thread Andy Shevchenko
On Sun, May 26, 2024 at 11:38:56PM +0530, Devarsh Thakkar wrote: > Add below rounding related macros: > > round_closest_up(x, y) : Rounds x to closest multiple of y where y is a > power of 2, with a preference to round up in case two nearest values are > possible. > > round_closest_down(x, y) :

[PATCH v9 06/10] math.h: Add macros for rounding to closest value

2024-05-26 Thread Devarsh Thakkar
Add below rounding related macros: round_closest_up(x, y) : Rounds x to closest multiple of y where y is a power of 2, with a preference to round up in case two nearest values are possible. round_closest_down(x, y) : Rounds x to closest multiple of y where y is a power of 2, with a preference to