From: David Howells <dhowells@redhat.com>
To: ksummit-discuss@lists.linuxfoundation.org
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Subject: [Ksummit-discuss] Should .c files be discouraged from #including UAPI headers directly?
Date: Wed, 06 Aug 2014 12:28:43 +0100 [thread overview]
Message-ID: <18667.1407324523@warthog.procyon.org.uk> (raw)
Is it okay for ordinary .c files to #include uapi/ files directly?
warthog>git grep 'include.*uapi/' -- \*.c
arch/arm/kernel/psci.c:#include <uapi/linux/psci.h>
arch/arm/kernel/psci_smp.c:#include <uapi/linux/psci.h>
arch/arm64/kernel/psci.c:#include <uapi/linux/psci.h>
arch/blackfin/kernel/setup.c:#include <uapi/linux/cramfs_fs.h>
arch/mips/bcm63xx/boards/board_bcm963xx.c:#include <uapi/linux/bcm933xx_hcs.h>
arch/mips/pci/pci-virtio-guest.c:#include <uapi/asm/bitfield.h>
arch/x86/vdso/vclock_gettime.c:#include <uapi/linux/time.h>
arch/xtensa/kernel/syscall.c:#include <uapi/asm/unistd.h>
drivers/gpu/drm/exynos/exynos_drm_fb.c:#include <uapi/drm/exynos_drm.h>
drivers/infiniband/core/sa_query.c:#include <uapi/linux/if_ether.h>
drivers/mtd/ar7part.c:#include <uapi/linux/magic.h>
...
or should they be encouraged to #include the non-uapi variant instead, eg:
#include <linux/psci.h>
rather than:
#include <uapi/linux/psci.h>
given that appropriate -I flags are supplied such that they'll fall back to
the UAPI header if a kernel-internal header does not exist?
David
next reply other threads:[~2014-08-06 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 11:28 David Howells [this message]
2014-08-06 14:45 ` Greg KH
2014-08-06 16:11 ` Jamal Hadi Salim
2014-08-06 16:24 ` 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=18667.1407324523@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=jhs@mojatatu.com \
--cc=ksummit-discuss@lists.linuxfoundation.org \
/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