From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Wed, 09 Sep 2015 20:25:40 +0200 Subject: [U-Boot] [PATCH v5] bitops: introduce BIT() definition In-Reply-To: <1441626234-16364-1-git-send-email-andreas.devel@googlemail.com> References: <1440176519-30102-2-git-send-email-hs@denx.de> <1441626234-16364-1-git-send-email-andreas.devel@googlemail.com> Message-ID: <20150909182540.25235380DF2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Andreas, In message <1441626234-16364-1-git-send-email-andreas.devel@googlemail.com> you wrote: ... > --- a/include/linux/bitops.h > +++ b/include/linux/bitops.h > @@ -3,6 +3,8 @@ > > #include > > +#define BIT(nr) (1UL << (nr)) What happens when someone decides to use this on a 64 bit register? Also, this definition is inherently wrong for Power Architecture (TM) systems, where bit 0 is the most significant bit. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Today is the yesterday you worried about tomorrow.