Displaying 4 results from an estimated 4 matches for "size_fn".
Did you mean:
size_
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
...time, in the case you are talking about, I really 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.
On a slight tangent.. Maybe we should have something like this:
#define size_fn(x, prefix, ...) ({ \
typeof(x) __ret; \
switch (sizeof(x)) { \
case 1: __ret = prefix##8(__VA_ARGS__); break; \
case 2: __ret = prefix##16(__VA_ARGS__); break; \
case 4: __ret = p...
2019 May 23
1
[RFC][PATCH] kernel.h: Add generic roundup_64() macro
...e 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 something like this:
>
> #define size_fn(x, prefix, ...) ({ \
> typeof(x) __ret; \
> switch (sizeof(x)) { \
> case 1: __ret = prefix##8(__VA_ARGS__); break; \
> case 2: __ret = prefix##16(__VA_ARGS__); break; \
>...
2013 Feb 07
5
[PATCH v8] gcov: Coverage support
Updated set of patches for coverage.
Changes:
- change copyright lines
- use gcov: instead of cover: in commit comment
- use #ifdef in xen/common/sysctl.c instead of dummy inline function
- added base documentation in docs/misc
- added -h option to xencov