All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-acpi@vger.kernel.org, Bob Moore <robert.moore@intel.com>
Subject: [PATCH 07/18] ACPICA: Do not abort _PRT repair on a single subpackage failure.
Date: Wed, 26 Feb 2014 10:30:43 +0800	[thread overview]
Message-ID: <7efa10101c62f237af5a04ed608b8384e48237f7.1393379348.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1393379348.git.lv.zheng@intel.com>

From: Bob Moore <robert.moore@intel.com>

Always examine all subpackages for reversed entries.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/nsrepair2.c |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c
index c57cd4a..1801214 100644
--- a/drivers/acpi/acpica/nsrepair2.c
+++ b/drivers/acpi/acpica/nsrepair2.c
@@ -620,12 +620,16 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info,
 	top_object_list = package_object->package.elements;
 	element_count = package_object->package.count;
 
-	for (index = 0; index < element_count; index++) {
+	/* Examine each subpackage */
+
+	for (index = 0; index < element_count; index++, top_object_list++) {
 		sub_package = *top_object_list;
 		sub_object_list = sub_package->package.elements;
 
-		if (sub_package->package.count < 4) {	/* Minimum required element count */
-			return (AE_OK);
+		/* Check for minimum required element count */
+
+		if (sub_package->package.count < 4) {
+			continue;
 		}
 
 		/*
@@ -640,15 +644,12 @@ acpi_ns_repair_PRT(struct acpi_evaluate_info *info,
 			sub_object_list[2] = obj_desc;
 			info->return_flags |= ACPI_OBJECT_REPAIRED;
 
-			ACPI_WARN_PREDEFINED((AE_INFO, info->full_pathname,
+			ACPI_WARN_PREDEFINED((AE_INFO,
+					      info->full_pathname,
 					      info->node_flags,
 					      "PRT[%X]: Fixed reversed SourceName and SourceIndex",
 					      index));
 		}
-
-		/* Point to the next union acpi_operand_object in the top level package */
-
-		top_object_list++;
 	}
 
 	return (AE_OK);
-- 
1.7.10


  parent reply	other threads:[~2014-02-26  2:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  2:27 [PATCH 00/18] ACPICA: 20140214 Release Lv Zheng
2014-02-26  2:28 ` [PATCH 01/18] ACPICA: Headers: Deploy #pragma pack (push) and (pop) Lv Zheng
2014-02-26  2:28 ` [PATCH 02/18] ACPICA: Predefined names: Add support for the _PRP method Lv Zheng
2014-02-26  2:28 ` [PATCH 03/18] ACPICA: Update conditional compilation flags for resource dump functions Lv Zheng
2014-02-26  2:29 ` [PATCH 04/18] ACPICA: Properly handle NULL entries in _PRT return packages Lv Zheng
2014-02-26  2:29 ` [PATCH 05/18] ACPICA: Restore code that repairs NULL package elements in return values Lv Zheng
2014-02-26  2:30 ` [PATCH 06/18] ACPICA: Harden _PRT repair code; check for minimum package length Lv Zheng
2014-02-26  2:30 ` Lv Zheng [this message]
2014-02-26  2:30 ` [PATCH 08/18] ACPICA: Add auto-serialization support for ill-behaved control methods Lv Zheng
2014-02-26  2:31 ` [PATCH 09/18] ACPICA: Comment update - no functional change Lv Zheng
2014-02-26  2:31 ` [PATCH 10/18] ACPICA: Add additional named objects for the auto-serialize method scan Lv Zheng
2014-02-26  2:31 ` [PATCH 11/18] ACPICA: Add global option to disable method auto-serialization Lv Zheng
2014-02-26  2:32 ` [PATCH 12/18] ACPICA: Remove global option to serialize all control methods Lv Zheng
2014-02-26  2:32 ` [PATCH 13/18] ACPICA: Cleanup/improve global variable declarations Lv Zheng
2014-02-26  2:33 ` [PATCH 14/18] ACPICA: Update for _PRP predefined name Lv Zheng
2014-02-26  2:33 ` [PATCH 15/18] ACPICA: Add text: ACPICA policy for new _OSI strings. No functional change Lv Zheng
2014-02-26  2:33 ` [PATCH 16/18] ACPICA: Debugger: Add missing objects; Traverse linked lists Lv Zheng
2014-02-26  2:33 ` [PATCH 17/18] ACPICA: Prevent infinite loops when traversing corrupted lists Lv Zheng
2014-02-26  2:33 ` [PATCH 18/18] ACPICA: Update version to 20140214 Lv Zheng
2014-03-05  6:12 ` [PATCH] ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)." Lv Zheng

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=7efa10101c62f237af5a04ed608b8384e48237f7.1393379348.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=zetalog@gmail.com \
    /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.