aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/hwvalid.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-12-19 00:37:21 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 06:36:18 -0500
commit9c0d793945a343e13d8b0ab20ac825ad5705bcf1 (patch)
tree27a9994d409d632a13a7b2698e3730b23dc069f5 /drivers/acpi/acpica/hwvalid.c
parent3e8214e5c2bd449b30109d4a098597ab1b7c9fb9 (diff)
ACPICA: Cleanup coding style 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 314 lines of 20121018 divergence.diff. ACPICA core uses ()'s on return statements. This is a known and committed differences from Linux standard coding style. This patch cleans up the Linux side ACPICA code to use this codying style in order to reduce the source code differences between Linux and ACPICA. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/hwvalid.c')
-rw-r--r--drivers/acpi/acpica/hwvalid.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index b6aae58299dc..70686cd0332e 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -135,7 +135,7 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
135 if ((bit_width != 8) && (bit_width != 16) && (bit_width != 32)) { 135 if ((bit_width != 8) && (bit_width != 16) && (bit_width != 32)) {
136 ACPI_ERROR((AE_INFO, 136 ACPI_ERROR((AE_INFO,
137 "Bad BitWidth parameter: %8.8X", bit_width)); 137 "Bad BitWidth parameter: %8.8X", bit_width));
138 return AE_BAD_PARAMETER; 138 return (AE_BAD_PARAMETER);
139 } 139 }
140 140
141 port_info = acpi_protected_ports; 141 port_info = acpi_protected_ports;
@@ -234,11 +234,11 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
234 status = acpi_hw_validate_io_request(address, width); 234 status = acpi_hw_validate_io_request(address, width);
235 if (ACPI_SUCCESS(status)) { 235 if (ACPI_SUCCESS(status)) {
236 status = acpi_os_read_port(address, value, width); 236 status = acpi_os_read_port(address, value, width);
237 return status; 237 return (status);
238 } 238 }
239 239
240 if (status != AE_AML_ILLEGAL_ADDRESS) { 240 if (status != AE_AML_ILLEGAL_ADDRESS) {
241 return status; 241 return (status);
242 } 242 }
243 243
244 /* 244 /*
@@ -253,7 +253,7 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
253 if (acpi_hw_validate_io_request(address, 8) == AE_OK) { 253 if (acpi_hw_validate_io_request(address, 8) == AE_OK) {
254 status = acpi_os_read_port(address, &one_byte, 8); 254 status = acpi_os_read_port(address, &one_byte, 8);
255 if (ACPI_FAILURE(status)) { 255 if (ACPI_FAILURE(status)) {
256 return status; 256 return (status);
257 } 257 }
258 258
259 *value |= (one_byte << i); 259 *value |= (one_byte << i);
@@ -262,7 +262,7 @@ acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width)
262 address++; 262 address++;
263 } 263 }
264 264
265 return AE_OK; 265 return (AE_OK);
266} 266}
267 267
268/****************************************************************************** 268/******************************************************************************
@@ -297,11 +297,11 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
297 status = acpi_hw_validate_io_request(address, width); 297 status = acpi_hw_validate_io_request(address, width);
298 if (ACPI_SUCCESS(status)) { 298 if (ACPI_SUCCESS(status)) {
299 status = acpi_os_write_port(address, value, width); 299 status = acpi_os_write_port(address, value, width);
300 return status; 300 return (status);
301 } 301 }
302 302
303 if (status != AE_AML_ILLEGAL_ADDRESS) { 303 if (status != AE_AML_ILLEGAL_ADDRESS) {
304 return status; 304 return (status);
305 } 305 }
306 306
307 /* 307 /*
@@ -317,12 +317,12 @@ acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width)
317 status = 317 status =
318 acpi_os_write_port(address, (value >> i) & 0xFF, 8); 318 acpi_os_write_port(address, (value >> i) & 0xFF, 8);
319 if (ACPI_FAILURE(status)) { 319 if (ACPI_FAILURE(status)) {
320 return status; 320 return (status);
321 } 321 }
322 } 322 }
323 323
324 address++; 324 address++;
325 } 325 }
326 326
327 return AE_OK; 327 return (AE_OK);
328} 328}