From: tip-bot for Denys Vlasenko <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: bp@alien8.de, ast@plumgrid.com, keescook@chromium.org,
wad@chromium.org, rostedt@goodmis.org, luto@amacapital.net,
linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com,
mingo@kernel.org, torvalds@linux-foundation.org,
dvlasenk@redhat.com, oleg@redhat.com, fweisbec@gmail.com
Subject: [tip:x86/asm] include/stddef.h: Move offsetofend() from vfio.h to a generic kernel header
Date: Mon, 16 Mar 2015 05:10:07 -0700 [thread overview]
Message-ID: <tip-23ec13ebc0426fc5f3ecc623c432d57f919e1b28@git.kernel.org> (raw)
In-Reply-To: <1425912738-559-1-git-send-email-dvlasenk@redhat.com>
Commit-ID: 23ec13ebc0426fc5f3ecc623c432d57f919e1b28
Gitweb: http://git.kernel.org/tip/23ec13ebc0426fc5f3ecc623c432d57f919e1b28
Author: Denys Vlasenko <dvlasenk@redhat.com>
AuthorDate: Mon, 9 Mar 2015 15:52:17 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 16 Mar 2015 11:05:37 +0100
include/stddef.h: Move offsetofend() from vfio.h to a generic kernel header
Suggested by Andy.
Suggested-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Will Drewry <wad@chromium.org>
Link: http://lkml.kernel.org/r/1425912738-559-1-git-send-email-dvlasenk@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/stddef.h | 9 +++++++++
include/linux/vfio.h | 13 -------------
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index f4aec0e..076af43 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -19,3 +19,12 @@ enum {
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
#endif
+
+/**
+ * offsetofend(TYPE, MEMBER)
+ *
+ * @TYPE: The type of the structure
+ * @MEMBER: The member within the structure to get the end offset of
+ */
+#define offsetofend(TYPE, MEMBER) \
+ (offsetof(TYPE, MEMBER) + sizeof(((TYPE *)0)->MEMBER))
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 2d67b89..049b2f4 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -78,19 +78,6 @@ extern int vfio_register_iommu_driver(const struct vfio_iommu_driver_ops *ops);
extern void vfio_unregister_iommu_driver(
const struct vfio_iommu_driver_ops *ops);
-/**
- * offsetofend(TYPE, MEMBER)
- *
- * @TYPE: The type of the structure
- * @MEMBER: The member within the structure to get the end offset of
- *
- * Simple helper macro for dealing with variable sized structures passed
- * from user space. This allows us to easily determine if the provided
- * structure is sized to include various fields.
- */
-#define offsetofend(TYPE, MEMBER) \
- (offsetof(TYPE, MEMBER) + sizeof(((TYPE *)0)->MEMBER))
-
/*
* External user API
*/
next prev parent reply other threads:[~2015-03-16 12:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 14:52 [PATCH 1/2] move offsetofend() from vfio.h to stddef.h Denys Vlasenko
2015-03-09 14:52 ` [PATCH 2/2 v2] x86: make 32-bit "emergency stack" better documented Denys Vlasenko
2015-03-09 15:16 ` Andy Lutomirski
2015-03-14 16:00 ` Pavel Machek
2015-03-14 17:24 ` Brian Gerst
2015-03-16 12:10 ` [tip:x86/asm] x86/asm/entry/32: Document the 32-bit SYSENTER " emergency stack" better tip-bot for Denys Vlasenko
2015-03-17 8:46 ` tip-bot for Denys Vlasenko
2015-03-09 14:58 ` [PATCH 1/2] move offsetofend() from vfio.h to stddef.h Ingo Molnar
2015-03-09 15:15 ` Denys Vlasenko
2015-03-09 15:28 ` Ingo Molnar
2015-03-09 15:30 ` Andy Lutomirski
2015-03-09 15:45 ` Ingo Molnar
2015-03-09 15:44 ` Alex Williamson
2015-03-09 16:16 ` Linus Torvalds
2015-03-16 12:10 ` tip-bot for Denys Vlasenko [this message]
2015-03-17 8:46 ` [tip:x86/asm] include/stddef.h: Move offsetofend() from vfio.h to a generic kernel header tip-bot for Denys Vlasenko
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=tip-23ec13ebc0426fc5f3ecc623c432d57f919e1b28@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ast@plumgrid.com \
--cc=bp@alien8.de \
--cc=dvlasenk@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=wad@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.