From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lv Zheng Subject: [PATCH 1/2] ACPICA: acpidump: Add sparse declarators support. Date: Tue, 11 Feb 2014 10:51:33 +0800 Message-ID: <451efbbddc55b941e64e294c9fcbda5c71e87d0a.1392086457.git.lv.zheng@intel.com> References: Return-path: Received: from mga11.intel.com ([192.55.52.93]:4148 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752540AbaBKCvm (ORCPT ); Mon, 10 Feb 2014 21:51:42 -0500 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Linux kernel build is not affected by this commit. Linux kernel resident ACPICA headers include some sparse declarators for kernel static checkers. This patch adds code to disable them for non __KERNEL__ defined code so that it is possible for the ACPICA user space tool's source files to be built with Linux kernel ACPICA header files included. Lv Zheng. Signed-off-by: Lv Zheng --- include/acpi/platform/aclinux.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 30c9a7c..f41f59b 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -89,6 +89,16 @@ #include #include +/* Disable kernel specific declarators */ + +#ifndef __init +#define __init +#endif + +#ifndef __iomem +#define __iomem +#endif + /* Host-dependent types and defines for user-space ACPICA */ #define ACPI_FLUSH_CPU_CACHE() -- 1.7.10 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752652AbaBKCwH (ORCPT ); Mon, 10 Feb 2014 21:52:07 -0500 Received: from mga11.intel.com ([192.55.52.93]:4148 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752540AbaBKCvm (ORCPT ); Mon, 10 Feb 2014 21:51:42 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,822,1384329600"; d="scan'208";a="479388977" From: Lv Zheng To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org Subject: [PATCH 1/2] ACPICA: acpidump: Add sparse declarators support. Date: Tue, 11 Feb 2014 10:51:33 +0800 Message-Id: <451efbbddc55b941e64e294c9fcbda5c71e87d0a.1392086457.git.lv.zheng@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linux kernel build is not affected by this commit. Linux kernel resident ACPICA headers include some sparse declarators for kernel static checkers. This patch adds code to disable them for non __KERNEL__ defined code so that it is possible for the ACPICA user space tool's source files to be built with Linux kernel ACPICA header files included. Lv Zheng. Signed-off-by: Lv Zheng --- include/acpi/platform/aclinux.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 30c9a7c..f41f59b 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -89,6 +89,16 @@ #include #include +/* Disable kernel specific declarators */ + +#ifndef __init +#define __init +#endif + +#ifndef __iomem +#define __iomem +#endif + /* Host-dependent types and defines for user-space ACPICA */ #define ACPI_FLUSH_CPU_CACHE() -- 1.7.10