From: David Howells <dhowells@redhat.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: dhowells@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
"H . Peter Anvin" <hpa@zytor.com>, Arnd Bergmann <arnd@arndb.de>,
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,
Alexander Popov <alex.popov@linux.com>,
Neeraj Upadhyay <neeraju@codeaurora.org>,
James Morse <james.morse@arm.com>,
linux-kernel@vger.kernel.org,
Santosh Shilimkar <ssantosh@kernel.org>,
Laura Abbott <labbott@redhat.com>,
Guan Xuetao <gxt@mprc.pku.edu.cn>,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Pratyush Anand <panand@redhat.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h
Date: Fri, 06 Jan 2017 10:45:55 +0000 [thread overview]
Message-ID: <15496.1483699555@warthog.procyon.org.uk> (raw)
In-Reply-To: <1483582810-7046-3-git-send-email-yamada.masahiro@socionext.com>
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> diff --git a/include/uapi/linux/const.h b/include/uapi/linux/const.h
> index c872bfd..76fb0f9 100644
> --- a/include/uapi/linux/const.h
> +++ b/include/uapi/linux/const.h
> @@ -1,7 +1,7 @@
> /* const.h: Macros for dealing with constants. */
>
> -#ifndef _LINUX_CONST_H
> -#define _LINUX_CONST_H
> +#ifndef _UAPI_LINUX_CONST_H
> +#define _UAPI_LINUX_CONST_H
You need to be very careful doing this. Some userspace stuff depends on the
guard macro names on the kernel header files.
> /* Some constant macros are used in both assembler and
> * C code. Therefore we cannot annotate them always with
> @@ -21,7 +21,10 @@
> #define _AT(T,X) ((T)(X))
> #endif
>
> +#define _UL(x) (_AC(x, UL))
> +#define _ULL(x) (_AC(x, ULL))
How likely is this to collide with existing userspace code somewhere? It
looks like the sort of thing that could collide with a C library.
David
next prev parent reply other threads:[~2017-01-06 10:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 2:20 [PATCH v2 0/4] linux/const.h: cleanups of macros such as UL(), _BITUL(), BIT() etc Masahiro Yamada
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 ` David Howells [this message]
2017-01-08 6:27 ` [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h 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=15496.1483699555@warthog.procyon.org.uk \
--to=dhowells@redhat.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=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@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=srinivas.pandruvada@linux.intel.com \
--cc=ssantosh@kernel.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
--cc=yamada.masahiro@socionext.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).