[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adad41nvgfc.fsf@roland-alpha.cisco.com>
Date: Tue, 05 Jan 2010 23:30:31 -0800
From: Roland Dreier <rdreier@...co.com>
To: Wu Fengguang <fengguang.wu@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Miller <davem@...emloft.net>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Eric Paris <eparis@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
"linux-fsdevel\@vger.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH v2] fs: O_* bit numbers uniqueness check
> Yeah, I chose the boot time check because of hweight32()..
One could do something like
#define HWEIGHT32(x) (!!((x) & (1u << 0)) +
!!((x) & (1u << 1)) +
//...
!!((x) & (1u << 31)));
that would probably work with BUILD_BUG_ON().
But as I said maybe it's too ugly.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists