[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNARMJVpd47L-3VRafZxdaBT09tA4Bq+V2yFAi_X+cCJsGg@mail.gmail.com>
Date: Sun, 8 Jan 2017 15:27:40 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: David Howells <dhowells@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: "H . Peter Anvin" <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
X86 ML <x86@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Russell King <linux@...linux.org.uk>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>,
Will Deacon <will.deacon@....com>,
Mark Rutland <mark.rutland@....com>,
Olof Johansson <olof@...om.net>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Alexander Popov <alex.popov@...ux.com>,
Neeraj Upadhyay <neeraju@...eaurora.org>,
James Morse <james.morse@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Santosh Shilimkar <ssantosh@...nel.org>,
Laura Abbott <labbott@...hat.com>,
Guan Xuetao <gxt@...c.pku.edu.cn>,
Nicolas Pitre <nicolas.pitre@...aro.org>,
Pratyush Anand <panand@...hat.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h
Hi.
2017-01-06 19:45 GMT+09:00 David Howells <dhowells@...hat.com>:
> Masahiro Yamada <yamada.masahiro@...ionext.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.
Oh...
>> /* 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.
Sorry, I do not have enough insight to answer your questions.
Andrew,
If this seems dangerous, please feel free to drop the entire series
because it is not adding any value except some cleanups.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists