X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Fresources%2Frsutils.c;h=befe2302f41b31b622dec454924a68ab5b847dd7;hb=c203e45f069af47ca7623e4dcd8c00bfba2722e4;hp=a9cbee8e8b44c3a12145c6be17ed36657e9ba1a5;hpb=c0bc8721b8d0380ec69fa97578c91201201b05a9;p=linux-2.6 diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c index a9cbee8e8b..befe2302f4 100644 --- a/drivers/acpi/resources/rsutils.c +++ b/drivers/acpi/resources/rsutils.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2006, 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);