summaryrefslogtreecommitdiffstats
path: root/include/acpi/platform/acenv.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-12-19 05:37:15 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 12:36:18 +0100
commit3e8214e5c2bd449b30109d4a098597ab1b7c9fb9 (patch)
tree1f256120555cba08aad93c865d02519698732554 /include/acpi/platform/acenv.h
parent739dcbb90a347a66f25cc0c3ef4eef3d4558f409 (diff)
downloadop-kernel-dev-3e8214e5c2bd449b30109d4a098597ab1b7c9fb9.zip
op-kernel-dev-3e8214e5c2bd449b30109d4a098597ab1b7c9fb9.tar.gz
ACPICA: Cleanup indentation to reduce differences between Linux and ACPICA.
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 210 lines of 20121018 divergence.diff. The ACPICA source codes uses a totally different indentation style from the Linux to be compatible with other users (operating systems or BIOS). Indentation differences are critical to the release automation. There are two causes related to the "indentation" that are affecting the release automation: 1. The ACPICA -> Linux release process is: ACPICA source -- acpisrc - hierarchy - indent -> linuxized ACPICA source -- diff -> linuxized ACPICA patch (x) -- human intervention -> linuxized ACPICA patch (o) Where 'x' means "cannot be directly applied to the Linux" 'o' means "can be directly applied to the Linux" Different "indent" version or "indent" options used in the "indent" step will lead to different divergences. The version of "indent" used for the current release process is: GNU indent 2.2.11 The options of "indent" used for the current release process is: -npro -kr -i8 -ts8 -sob -l80 -ss -ncs 2. Manual indentation prettifying work in the Linux side will also harm the automatically generated linuxized ACPICA patches, making them impossible to apply directly. This patch fixes source code differences caused by the two causes so that the "human intervention" can be reduced in the future. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi/platform/acenv.h')
-rw-r--r--include/acpi/platform/acenv.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index cec6cd3..a74afaf 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -49,6 +49,7 @@
* to the local environment. This includes compiler-specific, OS-specific,
* and machine-specific configuration.
*/
+
/* Types for ACPI_MUTEX_TYPE */
#define ACPI_BINARY_SEMAPHORE 0
@@ -66,6 +67,7 @@
*****************************************************************************/
/* iASL configuration */
+
#ifdef ACPI_ASL_COMPILER
#define ACPI_APPLICATION
#define ACPI_DISASSEMBLER
@@ -77,6 +79,7 @@
#endif
/* acpi_exec configuration. Multithreaded with full AML debugger */
+
#ifdef ACPI_EXEC_APP
#define ACPI_APPLICATION
#define ACPI_FULL_DEBUG
@@ -117,12 +120,14 @@
#endif
/* Common for all ACPICA applications */
+
#ifdef ACPI_APPLICATION
#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_USE_LOCAL_CACHE
#endif
/* Common debug support */
+
#ifdef ACPI_FULL_DEBUG
#define ACPI_DEBUGGER
#define ACPI_DEBUG_OUTPUT
@@ -138,6 +143,7 @@
* by the host files.
*
*****************************************************************************/
+
#if defined(_LINUX) || defined(__linux__)
#include <acpi/platform/aclinux.h>
@@ -294,7 +300,9 @@
/* Use the standard C library headers. We want to keep these to a minimum. */
#ifdef ACPI_USE_STANDARD_HEADERS
+
/* Use the standard headers from the standard locations */
+
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
@@ -303,6 +311,7 @@
#endif /* ACPI_USE_STANDARD_HEADERS */
/* We will be linking to the standard Clib functions */
+
#define ACPI_STRSTR(s1,s2) strstr((s1), (s2))
#define ACPI_STRCHR(s1,c) strchr((s1), (c))
#define ACPI_STRLEN(s) (acpi_size) strlen((s))
@@ -340,7 +349,6 @@
* implementation provided by a native C library, but they are functionally
* equivalent.
*/
-
#ifndef va_arg
#ifndef _VALIST
@@ -349,10 +357,12 @@ typedef char *va_list;
#endif /* _VALIST */
/* Storage alignment properties */
+
#define _AUPBND (sizeof (acpi_native_int) - 1)
#define _ADNBND (sizeof (acpi_native_int) - 1)
/* Variable argument list macro definitions */
+
#define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
#define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND))))
#define va_end(ap) (ap = (va_list) NULL)
@@ -361,6 +371,7 @@ typedef char *va_list;
#endif /* va_arg */
/* Use the local (ACPICA) definitions of the clib functions */
+
#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2))
#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c))
#define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s))
OpenPOWER on IntegriCloud