From: Roger Willcocks <roger@filmlight.ltd.uk>
To: Steven Rostedt <rostedt@goodmis.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: roger@filmlight.ltd.uk, LKML <linux-kernel@vger.kernel.org>,
Ben Skeggs <bskeggs@redhat.com>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
Leon Romanovsky <leon@kernel.org>,
Doug Ledford <dledford@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
linux-xfs@vger.kernel.org,
dri-devel <dri-devel@lists.freedesktop.org>,
nouveau@lists.freedesktop.org,
linux-rdma <linux-rdma@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] kernel.h: Add generic roundup_64() macro
Date: Fri, 24 May 2019 16:11:14 +0100 [thread overview]
Message-ID: <e4e875f0-2aa5-89f4-f462-78bedb9c5cde@filmlight.ltd.uk> (raw)
In-Reply-To: <20190523112740.7167aba4@gandalf.local.home>
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
next prev parent reply other threads:[~2019-05-24 15:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 14:00 Steven Rostedt
2019-05-23 14:00 ` Steven Rostedt
2019-05-23 15:10 ` Linus Torvalds
2019-05-23 15:27 ` Steven Rostedt
[not found] ` <20190523112740.7167aba4-f9ZlEuEWxVcJvu8Pb33WZ0EMvNT87kid@public.gmane.org>
2019-05-23 16:51 ` Linus Torvalds
2019-05-23 16:51 ` Linus Torvalds
2019-05-23 17:36 ` Steven Rostedt
2019-05-23 21:19 ` Linus Torvalds
2019-05-24 15:11 ` Roger Willcocks [this message]
2019-05-24 15:26 ` Steven Rostedt
2019-05-24 16:30 ` Nikolay Borisov
[not found] ` <bd4a85fc-dc56-aae0-4986-003ad4a11ef4-IBi9RG/b67k@public.gmane.org>
2019-05-24 16:36 ` Steven Rostedt
2019-05-24 16:36 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e4e875f0-2aa5-89f4-f462-78bedb9c5cde@filmlight.ltd.uk \
--to=roger@filmlight.ltd.uk \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=darrick.wong@oracle.com \
--cc=dledford@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--subject='Re: [RFC][PATCH] kernel.h: Add generic roundup_64() macro' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.