From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andreas_Bie=C3=9Fmann?= Date: Mon, 07 Sep 2015 14:01:11 +0200 Subject: [U-Boot] [PATCH v4 1/4] bitops: introduce BIT() definition In-Reply-To: <55ED7A94.2040607@denx.de> References: <1440176519-30102-1-git-send-email-hs@denx.de> <1440176519-30102-2-git-send-email-hs@denx.de> <55ED72FB.4090309@gmail.com> <55ED7A94.2040607@denx.de> Message-ID: <8a0bbcdb993ff355300abb242fa3f16d@biessmann.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Heiko, On 2015-09-07 13:52, Heiko Schocher wrote: > Hello Andreas, > > Am 07.09.2015 um 13:20 schrieb Andreas Bie?mann: >> On 08/21/2015 07:01 PM, Heiko Schocher wrote: >>> introduce BIT() definition, used in at91_udc gadget >>> driver. >>> >>> Signed-off-by: Heiko Schocher >>> >> >> NAK, this one breaks a lot of boards which already defined BIT() > > Uhh... seems this BIT() macro is a big mess ... > > Hmm Wolfgang Denk NACKed a similiar patch: > http://lists.denx.de/pipermail/u-boot/2014-February/173669.html > > In drivers/usb/gadget/at91_udc.c BIT(x) is used only once... > So I fix it there and use (1 << x) there. Would be this OK? I'm fine with this solution. Andreas > > bye, > Heiko >> >>> --- >>> >>> Changes in v4: None >>> Changes in v3: >>> - new in v3 >>> >>> Changes in v2: None >>> >>> include/linux/bitops.h | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/include/linux/bitops.h b/include/linux/bitops.h >>> index e724310..7d30ace 100644 >>> --- a/include/linux/bitops.h >>> +++ b/include/linux/bitops.h >>> @@ -3,6 +3,8 @@ >>> >>> #include >>> >>> +#define BIT(nr) (1UL << (nr)) >>> + >>> /* >>> * ffs: find first bit set. This is defined the same way as >>> * the libc and compiler builtin ffs routines, therefore >>> >>