[ACPI] ACPICA 20060210

Removed a couple of extraneous ACPI_ERROR messages that
appeared during normal execution. These became apparent
after the conversion from ACPI_DEBUG_PRINT.

Fixed a problem where the CreateField operator could hang
if the BitIndex or NumBits parameter referred to a named
object. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5359

Fixed a problem where a DeRefOf operation on a buffer
object incorrectly failed with an exception. This also
fixes a couple of related RefOf and DeRefOf issues.
From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5360
http://bugzilla.kernel.org/show_bug.cgi?id=5387
http://bugzilla.kernel.org/show_bug.cgi?id=5392

Fixed a problem where the AE_BUFFER_LIMIT exception was
returned instead of AE_STRING_LIMIT on an out-of-bounds
Index() operation. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5480

Implemented a memory cleanup at the end of the execution
of each iteration of an AML While() loop, preventing the
accumulation of outstanding objects. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5427

Eliminated a chunk of duplicate code in the object
resolution code. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5336

Fixed several warnings during the 64-bit code generation.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c
index 7d6481d..223bdc4 100644
--- a/drivers/acpi/resources/rscalc.c
+++ b/drivers/acpi/resources/rscalc.c
@@ -78,6 +78,7 @@
 	ACPI_FUNCTION_ENTRY();
 
 	for (bits_set = 0; bit_field; bits_set++) {
+
 		/* Zero the least significant bit that is set */
 
 		bit_field &= (bit_field - 1);
@@ -154,6 +155,7 @@
 	 * length, minus one byte for the resource_source_index itself.
 	 */
 	if (resource_length > minimum_aml_resource_length) {
+
 		/* Compute the length of the optional string */
 
 		string_length =
@@ -162,7 +164,7 @@
 
 	/* Round up length to 32 bits for internal structure alignment */
 
-	return (ACPI_ROUND_UP_to_32_bITS(string_length));
+	return ((u32) ACPI_ROUND_UP_to_32_bITS(string_length));
 }
 
 /*******************************************************************************
@@ -191,6 +193,7 @@
 	/* Traverse entire list of internal resource descriptors */
 
 	while (resource) {
+
 		/* Validate the descriptor type */
 
 		if (resource->type > ACPI_RESOURCE_TYPE_MAX) {
@@ -214,6 +217,7 @@
 			 * is a Large Resource data type.
 			 */
 			if (resource->data.vendor.byte_length > 7) {
+
 				/* Base size of a Large resource descriptor */
 
 				total_size =
@@ -346,6 +350,7 @@
 	/* Walk the list of AML resource descriptors */
 
 	while (aml_buffer < end_aml) {
+
 		/* Validate the Resource Type and Resource Length */
 
 		status = acpi_ut_validate_resource(aml_buffer, &resource_index);
@@ -390,7 +395,7 @@
 			 * Vendor Resource:
 			 * Ensure a 32-bit boundary for the structure
 			 */
-			extra_struct_bytes =
+			extra_struct_bytes = (u32)
 			    ACPI_ROUND_UP_to_32_bITS(resource_length) -
 			    resource_length;
 			break;
@@ -407,7 +412,7 @@
 			 * Vendor Resource:
 			 * Add vendor data and ensure a 32-bit boundary for the structure
 			 */
-			extra_struct_bytes =
+			extra_struct_bytes = (u32)
 			    ACPI_ROUND_UP_to_32_bITS(resource_length) -
 			    resource_length;
 			break;
@@ -431,7 +436,7 @@
 			 */
 			buffer++;
 
-			extra_struct_bytes =
+			extra_struct_bytes = (u32)
 			    /*
 			     * Add 4 bytes for each additional interrupt. Note: at
 			     * least one interrupt is required and is included in
@@ -450,7 +455,7 @@
 			 * Add the size of any optional data (resource_source)
 			 * Ensure a 64-bit boundary for the structure
 			 */
-			extra_struct_bytes =
+			extra_struct_bytes = (u32)
 			    ACPI_ROUND_UP_to_64_bITS
 			    (acpi_rs_stream_option_length
 			     (resource_length, minimum_aml_resource_length));
@@ -525,6 +530,7 @@
 	top_object_list = package_object->package.elements;
 
 	for (index = 0; index < number_of_elements; index++) {
+
 		/* Dereference the sub-package */
 
 		package_element = *top_object_list;