From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762263AbdAFKrf (ORCPT ); Fri, 6 Jan 2017 05:47:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59232 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162838AbdAFKqE (ORCPT ); Fri, 6 Jan 2017 05:46:04 -0500 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1483582810-7046-3-git-send-email-yamada.masahiro@socionext.com> References: <1483582810-7046-3-git-send-email-yamada.masahiro@socionext.com> <1483582810-7046-1-git-send-email-yamada.masahiro@socionext.com> To: Masahiro Yamada Cc: dhowells@redhat.com, Andrew Morton , "H . Peter Anvin" , Arnd Bergmann , x86@kernel.org, Thomas Gleixner , Russell King , Srinivas Pandruvada , Ingo Molnar , Will Deacon , Mark Rutland , Olof Johansson , Catalin Marinas , linux-arm-kernel@lists.infradead.org, Alexander Popov , Neeraj Upadhyay , James Morse , linux-kernel@vger.kernel.org, Santosh Shilimkar , Laura Abbott , Guan Xuetao , Nicolas Pitre , Pratyush Anand , Ard Biesheuvel Subject: Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15495.1483699555.1@warthog.procyon.org.uk> Date: Fri, 06 Jan 2017 10:45:55 +0000 Message-ID: <15496.1483699555@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 06 Jan 2017 10:46:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Masahiro Yamada 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