Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338463

Re: [RFC v2 1/6] x86/boot: add BIT() to boot/bitops.h

From "Luis R. Rodriguez" <mcgrof@suse.com>
Newsgroups linux.kernel
Subject Re: [RFC v2 1/6] x86/boot: add BIT() to boot/bitops.h
Date 2016-02-19 22:10 +0100
Message-ID <r40tj-2SE-1@gated-at.bofh.it> (permalink)
References <r3U4y-6g5-11@gated-at.bofh.it> <r3U4z-6g5-37@gated-at.bofh.it> <r3V0C-6Wq-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 19, 2016 at 10:14:42AM -0500, Boris Ostrovsky wrote:
> 
> 
> On 02/19/2016 09:15 AM, Luis R. Rodriguez wrote:
> >diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
> >index 878e4b9940d9..232cff0ff4e3 100644
> >--- a/arch/x86/boot/bitops.h
> >+++ b/arch/x86/boot/bitops.h
> >@@ -40,4 +40,6 @@ static inline void set_bit(int nr, void *addr)
> >  	asm("btsl %1,%0" : "+m" (*(u32 *)addr) : "Ir" (nr));
> >  }
> >+#define BIT(x)	(1 << x)
> 
> Parenthesize x.

I'll just use (1UL << (nr)) then as well to match what
include/linux/bitmap.h uses.

 Luis

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC v2 0/6] x86/init: use linker table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 15:20 +0100
  [RFC v2 2/6] x86/init: use linker tables to simplify x86 init and annotate dependencies "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 15:20 +0100
    Re: [RFC v2 2/6] x86/init: use linker tables to simplify x86 init and  annotate dependencies Andy Lutomirski <luto@amacapital.net> - 2016-02-19 17:50 +0100
      Re: [RFC v2 2/6] x86/init: use linker tables to simplify x86 init  and annotate dependencies "Luis R. Rodriguez" <mcgrof@kernl.org> - 2016-02-20 01:50 +0100
        Re: [RFC v2 2/6] x86/init: use linker tables to simplify x86 init and  annotate dependencies Andy Lutomirski <luto@amacapital.net> - 2016-02-20 08:40 +0100
  [RFC v2 3/6] x86/init: move ebda reservations into linker table "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 15:20 +0100
  [RFC v2 1/6] x86/boot: add BIT() to boot/bitops.h "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 15:20 +0100
    Re: [RFC v2 1/6] x86/boot: add BIT() to boot/bitops.h Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-02-19 16:20 +0100
      Re: [RFC v2 1/6] x86/boot: add BIT() to boot/bitops.h "Luis R. Rodriguez" <mcgrof@suse.com> - 2016-02-19 22:10 +0100
  [RFC v2 6/6] x86/init: use linker table for mid early setup "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 15:20 +0100
  [RFC v2 4/6] x86/init: use linker table for i386 early setup "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-02-19 15:20 +0100

csiph-web