Displaying 3 results from an estimated 3 matches for "round_up_size".
2019 May 23
1
[RFC][PATCH] kernel.h: Add generic roundup_64() macro
...se \
> __ret = size_fn(x, prefix##_s, __VA_ARGS__); \
> __ret; })
>
> which would allow typed integer functions like this. So you could do
> something like
>
> #define round_up(x, y) size_fn(x, round_up_size, x, y)
>
> and then you define functions for round_up_size8/16/32/64 (and you
You mean define functions for round_up_size_{u|s}8/16/32/64
> have toi declare - but not define - round_up_sizebad()).
>
> Of course, you probably want the usual "at least use 'int'" s...
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;
2019 May 23
0
[RFC][PATCH] kernel.h: Add generic roundup_64() macro
...##_u, __VA_ARGS__); \
else \
__ret = size_fn(x, prefix##_s, __VA_ARGS__); \
__ret; })
which would allow typed integer functions like this. So you could do
something like
#define round_up(x, y) size_fn(x, round_up_size, x, y)
and then you define functions for round_up_size8/16/32/64 (and you
have toi declare - but not define - round_up_sizebad()).
Of course, you probably want the usual "at least use 'int'" semantics,
in which case the "type" should be "(x)+0":
#define...