From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: [PATCH v2 2/8] kvm tools: don't bother including linux/compiler.h Date: Thu, 22 Nov 2012 15:58:11 +0000 Message-ID: <1353599897-15656-3-git-send-email-will.deacon@arm.com> References: <1353599897-15656-1-git-send-email-will.deacon@arm.com> Cc: penberg@kernel.org, marc.zyngier@arm.com, c.dall@virtualopensystems.com, matt@ozlabs.org, peter.maydell@linaro.org, michael@ellerman.id.au, levinsasha928@gmail.com, kvmarm@lists.cs.columbia.edu, Will Deacon To: kvm@vger.kernel.org Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:52264 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752566Ab2KVSaf (ORCPT ); Thu, 22 Nov 2012 13:30:35 -0500 In-Reply-To: <1353599897-15656-1-git-send-email-will.deacon@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: linux/compiler.h will never give us a definition for __compiler_offsetof because __KERNEL__ isn't defined, so just use the simple definition that we have already. This patch removes the redundant code. Signed-off-by: Will Deacon --- tools/kvm/include/linux/stddef.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/kvm/include/linux/stddef.h b/tools/kvm/include/linux/stddef.h index 60ea512..39da808 100644 --- a/tools/kvm/include/linux/stddef.h +++ b/tools/kvm/include/linux/stddef.h @@ -1,16 +1,10 @@ #ifndef _LINUX_STDDEF_H #define _LINUX_STDDEF_H -#include - #undef NULL #define NULL ((void *)0) #undef offsetof -#ifdef __compiler_offsetof -#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) -#else #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif #endif -- 1.8.0