]> err.no Git - linux-2.6/blobdiff - drivers/acpi/resources/rsutils.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6] / drivers / acpi / resources / rsutils.c
index 2442a8f8df576e240fb40323da8689655d1732b3..befe2302f41b31b622dec454924a68ab5b847dd7 100644 (file)
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2007, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -97,17 +97,17 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)
 u16 acpi_rs_encode_bitmask(u8 * list, u8 count)
 {
        acpi_native_uint i;
-       u16 mask;
+       acpi_native_uint mask;
 
        ACPI_FUNCTION_ENTRY();
 
        /* Encode the list into a single bitmask */
 
        for (i = 0, mask = 0; i < count; i++) {
-               mask |= (0x0001 << list[i]);
+               mask |= (0x1 << list[i]);
        }
 
-       return (mask);
+       return ((u16) mask);
 }
 
 /*******************************************************************************
@@ -353,10 +353,8 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
                 *
                 * Zero the entire area of the buffer.
                 */
-               total_length =
-                   (u32)
-                   ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) +
-                   1;
+               total_length = (u32)
+               ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + 1;
                total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length);
 
                ACPI_MEMSET(resource_source->string_ptr, 0, total_length);