Displaying 2 results from an estimated 2 matches for "dm_db".
2019 May 23
1
[RFC][PATCH] kernel.h: Add generic roundup_64() macro
...eally do
> suspect that we have a (non-constant) power of two, and that you
> should have just used "round_up()" which works fine regardless of
> size, and is always efficient.
I think you are correct in this.
act_size = roundup_64(attr->length, MLX5_SW_ICM_BLOCK_SIZE(dm_db->dev));
Where we have:
#define MLX5_SW_ICM_BLOCK_SIZE(dev) (1 << MLX5_LOG_SW_ICM_BLOCK_SIZE(dev))
Which pretty much guarantees that it is a power of two. Thus, the real
fix here is simply to s/roundup/round_up/ as you suggest.
>
> On a slight tangent.. Maybe we should have somet...
2019 May 23
4
[RFC][PATCH] kernel.h: Add generic roundup_64() macro
On Thu, 23 May 2019 08:10:44 -0700
Linus Torvalds <torvalds at linux-foundation.org> wrote:
> On Thu, May 23, 2019 at 7:00 AM Steven Rostedt <rostedt at goodmis.org> wrote:
> >
> > +# define roundup_64(x, y) ( \
> > +{ \
> > + typeof(y) __y = y;