linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "H . Peter Anvin" <hpa@zytor.com>, Arnd Bergmann <arnd@arndb.de>,
	David Howells <dhowells@redhat.com>,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Russell King <linux@armlinux.org.uk>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will.deacon@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Olof Johansson <olof@lixom.net>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Pratyush Anand <panand@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	James Morse <james.morse@arm.com>,
	Nicolas Pitre <nicolas.pitre@linaro.org>,
	linux-m68k@vger.kernel.org, Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Shaohua Li <shli@fb.com>, Alexander Popov <alex.popov@linux.com>,
	Guoqing Jiang <gqjiang@suse.com>,
	linux-kernel@vger.kernel.org,
	Santosh Shilimkar <ssantosh@kernel.org>,
	zijun_hu <zijun_hu@htc.com>, Laura Abbott <labbott@redhat.com>,
	Neeraj Upadhyay <neeraju@codeaurora.org>
Subject: [PATCH v2 0/4] linux/const.h: cleanups of macros such as UL(), _BITUL(), BIT() etc.
Date: Thu,  5 Jan 2017 11:20:05 +0900	[thread overview]
Message-ID: <1483582810-7046-1-git-send-email-yamada.masahiro@socionext.com> (raw)


ARM, ARM64, UniCore32 define UL() as a shorthand of _AC(..., UL).
In the future, more architectures may introduce it, so move
the definition to include/linux/const.h.

The _AC() is used for either (likely) UL or (unlikely) ULL.
Having UL(L) in a common place can avoid direct use of _AC().

The _AC() is defined under the uapi directory, so it compels
underscore-prefixed macros even for unexported headers.

I see similar situation for _BITUL().  This is available in
both C and assembly.  However, it is defined in an uapi header,
so direct use of the underscore macro is needed even for unexported
headers.  The 3/3 makes BIT() available in assembly too, which will
be more suitable for use in unexported headers.


Changes in v2:
  - Split out as a prerequisite patch

Masahiro Yamada (4):
  m68k: rename UL() to TO_UL()
  linux/const.h: move UL() macro to include/linux/const.h
  linux/const.h: refactor _BITUL and _BITULL a bit
  linux/const.h: move BIT(_ULL) to linux/const.h for use in assembly

 arch/arm/include/asm/memory.h       |  6 ------
 arch/arm64/include/asm/memory.h     |  6 ------
 arch/m68k/mm/init.c                 |  6 +++---
 arch/unicore32/include/asm/memory.h |  6 ------
 include/linux/bitops.h              |  3 +--
 include/linux/const.h               | 12 ++++++++++++
 include/uapi/linux/const.h          | 13 ++++++++-----
 7 files changed, 24 insertions(+), 28 deletions(-)
 create mode 100644 include/linux/const.h

-- 
2.7.4

             reply	other threads:[~2017-01-05  2:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05  2:20 Masahiro Yamada [this message]
2017-01-05  2:20 ` [PATCH v2 1/4] m68k: rename UL() to TO_UL() Masahiro Yamada
2017-01-05  2:20 ` [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h Masahiro Yamada
2017-01-05 11:18   ` Catalin Marinas
2017-01-05 11:24   ` Russell King - ARM Linux
2017-01-05  2:20 ` [PATCH v2 3/4] linux/const.h: refactor _BITUL and _BITULL a bit Masahiro Yamada
2017-01-05  2:20 ` [PATCH v2 4/4] linux/const.h: move BIT(_ULL) to linux/const.h for use in assembly Masahiro Yamada
2017-01-06 10:45 ` [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h David Howells
2017-01-08  6:27   ` Masahiro Yamada

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=1483582810-7046-1-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.popov@linux.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=dhowells@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=gqjiang@suse.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=labbott@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=neeraju@codeaurora.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=olof@lixom.net \
    --cc=panand@redhat.com \
    --cc=shli@fb.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=ssantosh@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.org \
    --cc=zijun_hu@htc.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).