ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: ksummit-discuss@lists.linuxfoundation.org
Cc: mchehab@s-opensource.com, hans.verkuil@cisco.com,
	apw@canonical.com, joe@perches.com
Subject: [Ksummit-discuss] UAPI headers and inline function policy
Date: Mon, 23 Jan 2017 11:20:25 +0000	[thread overview]
Message-ID: <31831.1485170425@warthog.procyon.org.uk> (raw)

I noticed that include/uapi/linux/cec.h and cec-funcs.h export a bunch of
inline functions to userspace.  I think that the following should possibly be
prohibited in kernel UAPI headers:

 (1) Inline functions and function declarations.

 (2) Anonymous embedded structs and unions.

 (3) Conditionals, other than re-inclusion guards and C++ guards.  Definitely
     no dependencies on CONFIG_* or __ARCH_* or __KERNEL__.  Ideally, we
     should be able to copy the headers as-are to /usr/include/ without the
     need to run them through a filter.

 (4) The extern keyword - except when used in a C++ guard.

Now, we already have some violations of these that we probably can't get rid
of, but anything added in the last merge window we probably can deal with.

Thoughts?

David

             reply	other threads:[~2017-01-23 11:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <521f636c-c768-2d01-18c6-e5b6b96b6d8f@cisco.com>
2017-01-23 11:20 ` David Howells [this message]
2017-01-23 11:35   ` Greg KH
2017-01-23 17:27   ` David Howells

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=31831.1485170425@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=apw@canonical.com \
    --cc=hans.verkuil@cisco.com \
    --cc=joe@perches.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=mchehab@s-opensource.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