Re: [RFC][PATCH] kernel.h: Add generic roundup_64() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]<

 




On 23/05/2019 16:27, Steven Rostedt wrote:

I haven't yet tested this, but what about something like the following:

...perhaps forget about the constant check, and just force
the power of two check:

							\
	if (!(__y & (__y >> 1))) {			\
		__x = round_up(x, y);			\
	} else {					\

You probably want

           if (!(__y & (__y - 1))

--

Roger


_______________________________________________
Nouveau mailing list
Nouveau@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/nouveau




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux