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


Groups > linux.kernel > #1367553

Re: [PATCH] uapi/linux/stddef.h: Provide __always_inline to userspace headers

Path csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Josh Boyer <jwboyer@fedoraproject.org>
Newsgroups linux.kernel
Subject Re: [PATCH] uapi/linux/stddef.h: Provide __always_inline to userspace headers
Date Wed, 30 Mar 2016 22:10:03 +0200
Message-ID <riuBd-28V-33@gated-at.bofh.it> (permalink)
References <ria9t-4ad-23@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=uYaRWt5sPdz7KxC6ZceC2f+7k2J9niixNztsqo7j+OA=; b=Pn3uu9UFosP2mAa0WGYDXz44Yue91N0agR9EtdS7lLCkUcdEHnDWjVLCjs9YMalQKE vMiEqBHHw42NCWP153zYfY4KHrMoL24F+I1QEuAOK0HML3NVevGzbW17t4cTPPZcGEiP X/pVkIPgH7sBqnxVMCVJK39w9tjy3/kp5TCltqMnxZDfyvcT3siN9SeJMKe0N+Rbrl6n Z3Zmw0ug7R0NYjjUw8+1szJynLoK8i05FjiCL1g2fdGlc4hSW9emVvU+IeCx/CFQzarS J/MhRzfNIhH5IZoveXJwZrQGOkFGPHtVCe8lZj1h6lwPYEk2Aw2LS3CgELcPMxPTI7DP hGJw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=uYaRWt5sPdz7KxC6ZceC2f+7k2J9niixNztsqo7j+OA=; b=cPRz4ORDNn2MqSnlEuu3NUGS1YenRFSvxMc8Ja/HLfrlSWenJWCNgnBmHrJeeZovR2 +K/hi0eljvpPP8LXsR+YPYIBJZtiNJmrAZNvjNrLWG5fAgJxIMKrN7r+nabUYA38DVoI ylIEjhyOWdWjYbDxgyChtrFNmjjmImrpXk1nmeXevJIB2GPSmxEAx/aQ4hUSQETyFLLV lrZr7O4lxdL4J00Bee86TTBu/lDr5pnKretOpTiIt6qjdvjyNYxXN4p0KZPf19yYb5F5 SnoxzDQ4R4kN6s/noCeOga9dTTobszo8nhchvrSPt4x7s/E8W8+Ml3/LwQG7jfgoXrwo XPcg==
X-Gm-Message-State AD7BkJKcZ2uYE+3Yku8YPvPi8oInxjZhAtWQSQlOjteN768QQOAFQErNAnvcKG17LkW3zRvIxBAXxL7W4+SOJg==
MIME-Version 1.0
X-Received by 10.202.205.209 with SMTP id d200mr6047832oig.119.1459368013902; Wed, 30 Mar 2016 13:00:13 -0700 (PDT)
X-Google-Sender-Auth pSaA9BcCb2Sf1EgzD8hG_f2bKco
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 58
Organization linux.* mail to news gateway
X-Original-Cc Linus Torvalds <torvalds@linux-foundation.org>, Thomas Graf <tgraf@suug.ch>, Peter Zijlstra <peterz@infradead.org>, David Rientjes <rientjes@google.com>, Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, "Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
X-Original-Date Wed, 30 Mar 2016 16:00:13 -0400
X-Original-Message-ID <CA+5PVA6HS-ihxkh1Kcg4Gs-Bx-Utswgzfp=fAaU-U+e4Jc4nGA@mail.gmail.com>
X-Original-References <1459289697-12875-1-git-send-email-dvlasenk@redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1367553

Show key headers only | View raw


On Tue, Mar 29, 2016 at 6:14 PM, Denys Vlasenko <dvlasenk@redhat.com> wrote:
> Recent change to uapi/linux/swab.h needs this.
>
> Unfortunately, UAPI headers don't include compiler.h and fixing it there is not enough.
>
> Tested. Testcase: "make headers_install" and try to compile this:
>
>         #include <linux/swab.h>
>         void main() {}
>
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Josh Boyer <jwboyer@fedoraproject.org>
> CC: Thomas Graf <tgraf@suug.ch>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: David Rientjes <rientjes@google.com>
> CC: Arnd Bergmann <arnd@arndb.de>
> CC: Ingo Molnar <mingo@kernel.org>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: Linus Torvalds <torvalds@linux-foundation.org>
> CC: linux-kernel@vger.kernel.org
> ---
>  include/uapi/linux/stddef.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h
> index aa9f104..621fa8a 100644
> --- a/include/uapi/linux/stddef.h
> +++ b/include/uapi/linux/stddef.h
> @@ -1 +1,5 @@
>  #include <linux/compiler.h>
> +
> +#ifndef __always_inline
> +#define __always_inline inline
> +#endif

This does appear to fix the compile failure, so from that point of
view you can add:

Tested-by: Josh Boyer <jwboyer@fedoraproject.org>

if you'd like.

One thing I did notice that is somewhat unrelated is that the
installed linux/stddef.h is devoid of any header guards.  So it is a
file that literally just has the hunk you've patched in and doesn't
have the somewhat standard:

#ifndef _UAPI_LINUX_STDDEF_H
#define _UAPI_LINUX_STDDEF_H

...

#endif

I'm not sure how important that is, but it might be nice to add for
consistency's sake.

josh

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


Thread

[PATCH] uapi/linux/stddef.h: Provide __always_inline to userspace headers Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-30 00:20 +0200
  [tip:core/urgent] uapi/linux/stddef.h: Provide __always_inline to  userspace headers tip-bot for Denys Vlasenko <tipbot@zytor.com> - 2016-03-30 13:00 +0200
  Re: [PATCH] uapi/linux/stddef.h: Provide __always_inline to userspace headers Josh Boyer <jwboyer@fedoraproject.org> - 2016-03-30 22:10 +0200

csiph-web