From 75c8044fb38051713000e0d151852f5f9614f77b Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 19 Dec 2012 05:36:49 +0000 Subject: ACPICA: Cleanup updated comments. 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 558 lines of 20121018 divergence.diff. This patch reduces the source code diff between Linux and ACPICA by cleaning the comments that already have been updated in ACPICA. There is no extra indentation done in this patch. Even the empty line deletions and insertions are also splitted into another cleanup patch so that this patch can be easily reviewed, and the binary differences can be held to a lowest level. Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsxfeval.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/acpi/acpica/nsxfeval.c') diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index d6a9f77972b6..70bbc1f9de0d 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -606,6 +606,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, for (i = 0; i < cid->count; i++) { if (ACPI_STRCMP(cid->ids[i].string, info->hid) == 0) { + /* Found a matching CID */ found = 1; break; } -- cgit From 739dcbb90a347a66f25cc0c3ef4eef3d4558f409 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Thu, 20 Dec 2012 01:07:26 +0000 Subject: ACPICA: Cleanup source 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 389 lines of 20121018 divergence.diff. This patch reduces source code diff caused by the simple code maintenance work: 1. Deletion of the unused include files. 2. Deletion of the deprecated codes blocks. 3. Repositioning of the code blocks. 4. Replacing the values with the well defined macros. 5. Replacing the types with the equivalent types. Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsxfeval.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/acpi/acpica/nsxfeval.c') diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index 70bbc1f9de0d..5c05ba3bc0d5 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -602,18 +602,20 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, /* Walk the CID list */ - found = 0; + found = FALSE; for (i = 0; i < cid->count; i++) { if (ACPI_STRCMP(cid->ids[i].string, info->hid) == 0) { /* Found a matching CID */ - found = 1; + found = TRUE; break; } } + ACPI_FREE(cid); - if (!found) + if (!found) { return (AE_OK); + } } } -- cgit From 3e8214e5c2bd449b30109d4a098597ab1b7c9fb9 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 19 Dec 2012 05:37:15 +0000 Subject: 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 Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsxfeval.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/acpi/acpica/nsxfeval.c') diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index 5c05ba3bc0d5..a5d8ccce10fd 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -606,7 +606,9 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, for (i = 0; i < cid->count; i++) { if (ACPI_STRCMP(cid->ids[i].string, info->hid) == 0) { + /* Found a matching CID */ + found = TRUE; break; } -- cgit From 7b6afb6782053f9679f5b9f05287f8c700d7d68f Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 19 Dec 2012 05:37:29 +0000 Subject: ACPICA: Fix broken call depth tracing logic. This patch does not affect the generation of the Linux binary. This patch decreases 26 lines of 20121018 divergence.diff. The ACPICA uses a call depth tracing mechanism by wrapping the return statements with return macros and marking the entrance with ACPI_FUNCTION_TRACE_ macros. There are other ACPI_FUNCTION_ macros used to mark the functions not using this tracing mechanism. This patch fixes broken call depth tracing logic. Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsxfeval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/acpi/acpica/nsxfeval.c') diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index a5d8ccce10fd..ef29925d1620 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -492,7 +492,7 @@ acpi_walk_namespace(acpi_object_type type, */ status = acpi_ut_acquire_read_lock(&acpi_gbl_namespace_rw_lock); if (ACPI_FAILURE(status)) { - return status; + return_ACPI_STATUS(status); } /* @@ -550,7 +550,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); + return (status); } node = acpi_ns_validate_handle(obj_handle); -- cgit From 04a81dce13c672757637b759039de216ed29a536 Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 31 Dec 2012 00:05:17 +0000 Subject: ACPICA: Eliminate some small unnecessary pathname functions. Removed several small pathname functions to increase efficiency. Essentially, they replace a function call with a single compare. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsxfeval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/acpi/acpica/nsxfeval.c') diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index ef29925d1620..1070eeefcbce 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -236,7 +236,7 @@ acpi_evaluate_object(acpi_handle handle, * 2) No handle, not fully qualified pathname (error) * 3) Valid handle */ - if ((pathname) && (acpi_ns_valid_root_prefix(pathname[0]))) { + if ((pathname) && (ACPI_IS_ROOT_PREFIX(pathname[0]))) { /* The path is fully qualified, just evaluate by name */ -- cgit From 25f044e64568dd83de34c16c837a96bbb2b0cecb Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 25 Jan 2013 05:38:56 +0000 Subject: ACPICA: Update ACPICA copyrights to 2013 Includes all source headers and signons for the various tools. Signed-off-by: Bob Moore Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsxfeval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/acpi/acpica/nsxfeval.c') diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index 1070eeefcbce..fc69949151bb 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2013, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without -- cgit