aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpica/exconfig.c4
-rw-r--r--drivers/acpi/acpica/hwgpe.c6
-rw-r--r--drivers/acpi/acpica/hwvalid.c18
-rw-r--r--drivers/acpi/acpica/nspredef.c2
-rw-r--r--drivers/acpi/acpica/nswalk.c4
-rw-r--r--drivers/acpi/acpica/nsxfname.c14
-rw-r--r--drivers/acpi/acpica/rscalc.c2
-rw-r--r--drivers/acpi/acpica/rsutils.c2
-rw-r--r--drivers/acpi/acpica/tbutils.c2
-rw-r--r--drivers/acpi/acpica/utcopy.c4
-rw-r--r--drivers/acpi/acpica/utlock.c14
11 files changed, 37 insertions, 35 deletions
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index b4f42f56fc34..d0cc2a40edfb 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -304,7 +304,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)
304 acpi_ev_address_space_dispatch(obj_desc, NULL, ACPI_READ, 304 acpi_ev_address_space_dispatch(obj_desc, NULL, ACPI_READ,
305 region_offset, 8, &value); 305 region_offset, 8, &value);
306 if (ACPI_FAILURE(status)) { 306 if (ACPI_FAILURE(status)) {
307 return status; 307 return (status);
308 } 308 }
309 309
310 *buffer = (u8)value; 310 *buffer = (u8)value;
@@ -312,7 +312,7 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)
312 region_offset++; 312 region_offset++;
313 } 313 }
314 314
315 return AE_OK; 315 return (AE_OK);
316} 316}
317 317
318/******************************************************************************* 318/*******************************************************************************
diff --git a/drivers/acpi/acpica/hwgpe.c b/drivers/acpi/acpica/hwgpe.c
index 64560045052d..095666bdad07 100644
--- a/drivers/acpi/acpica/hwgpe.c
+++ b/drivers/acpi/acpica/hwgpe.c
@@ -69,8 +69,10 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
69 69
70u32 acpi_hw_get_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info) 70u32 acpi_hw_get_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info)
71{ 71{
72 return (u32)1 << (gpe_event_info->gpe_number - 72
73 gpe_event_info->register_info->base_gpe_number); 73 return ((u32)1 <<
74 (gpe_event_info->gpe_number -
75 gpe_event_info->register_info->base_gpe_number));
74} 76}
75 77
76/****************************************************************************** 78/******************************************************************************
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}
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 352be3bd1562..1f0e93401436 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -147,7 +147,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
147 147
148 pathname = acpi_ns_get_external_pathname(node); 148 pathname = acpi_ns_get_external_pathname(node);
149 if (!pathname) { 149 if (!pathname) {
150 return AE_OK; /* Could not get pathname, ignore */ 150 return (AE_OK); /* Could not get pathname, ignore */
151 } 151 }
152 152
153 /* 153 /*
diff --git a/drivers/acpi/acpica/nswalk.c b/drivers/acpi/acpica/nswalk.c
index 0483877f26b8..4657e75624c4 100644
--- a/drivers/acpi/acpica/nswalk.c
+++ b/drivers/acpi/acpica/nswalk.c
@@ -76,12 +76,12 @@ struct acpi_namespace_node *acpi_ns_get_next_node(struct acpi_namespace_node
76 76
77 /* It's really the parent's _scope_ that we want */ 77 /* It's really the parent's _scope_ that we want */
78 78
79 return parent_node->child; 79 return (parent_node->child);
80 } 80 }
81 81
82 /* Otherwise just return the next peer */ 82 /* Otherwise just return the next peer */
83 83
84 return child_node->peer; 84 return (child_node->peer);
85} 85}
86 86
87/******************************************************************************* 87/*******************************************************************************
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index 811c6f13f476..520bab471dbf 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -539,14 +539,14 @@ acpi_status acpi_install_method(u8 *buffer)
539 /* Parameter validation */ 539 /* Parameter validation */
540 540
541 if (!buffer) { 541 if (!buffer) {
542 return AE_BAD_PARAMETER; 542 return (AE_BAD_PARAMETER);
543 } 543 }
544 544
545 /* Table must be a DSDT or SSDT */ 545 /* Table must be a DSDT or SSDT */
546 546
547 if (!ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) && 547 if (!ACPI_COMPARE_NAME(table->signature, ACPI_SIG_DSDT) &&
548 !ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT)) { 548 !ACPI_COMPARE_NAME(table->signature, ACPI_SIG_SSDT)) {
549 return AE_BAD_HEADER; 549 return (AE_BAD_HEADER);
550 } 550 }
551 551
552 /* First AML opcode in the table must be a control method */ 552 /* First AML opcode in the table must be a control method */
@@ -554,7 +554,7 @@ acpi_status acpi_install_method(u8 *buffer)
554 parser_state.aml = buffer + sizeof(struct acpi_table_header); 554 parser_state.aml = buffer + sizeof(struct acpi_table_header);
555 opcode = acpi_ps_peek_opcode(&parser_state); 555 opcode = acpi_ps_peek_opcode(&parser_state);
556 if (opcode != AML_METHOD_OP) { 556 if (opcode != AML_METHOD_OP) {
557 return AE_BAD_PARAMETER; 557 return (AE_BAD_PARAMETER);
558 } 558 }
559 559
560 /* Extract method information from the raw AML */ 560 /* Extract method information from the raw AML */
@@ -572,13 +572,13 @@ acpi_status acpi_install_method(u8 *buffer)
572 */ 572 */
573 aml_buffer = ACPI_ALLOCATE(aml_length); 573 aml_buffer = ACPI_ALLOCATE(aml_length);
574 if (!aml_buffer) { 574 if (!aml_buffer) {
575 return AE_NO_MEMORY; 575 return (AE_NO_MEMORY);
576 } 576 }
577 577
578 method_obj = acpi_ut_create_internal_object(ACPI_TYPE_METHOD); 578 method_obj = acpi_ut_create_internal_object(ACPI_TYPE_METHOD);
579 if (!method_obj) { 579 if (!method_obj) {
580 ACPI_FREE(aml_buffer); 580 ACPI_FREE(aml_buffer);
581 return AE_NO_MEMORY; 581 return (AE_NO_MEMORY);
582 } 582 }
583 583
584 /* Lock namespace for acpi_ns_lookup, we may be creating a new node */ 584 /* Lock namespace for acpi_ns_lookup, we may be creating a new node */
@@ -644,12 +644,12 @@ acpi_status acpi_install_method(u8 *buffer)
644 /* Remove local reference to the method object */ 644 /* Remove local reference to the method object */
645 645
646 acpi_ut_remove_reference(method_obj); 646 acpi_ut_remove_reference(method_obj);
647 return status; 647 return (status);
648 648
649error_exit: 649error_exit:
650 650
651 ACPI_FREE(aml_buffer); 651 ACPI_FREE(aml_buffer);
652 ACPI_FREE(method_obj); 652 ACPI_FREE(method_obj);
653 return status; 653 return (status);
654} 654}
655ACPI_EXPORT_SYMBOL(acpi_install_method) 655ACPI_EXPORT_SYMBOL(acpi_install_method)
diff --git a/drivers/acpi/acpica/rscalc.c b/drivers/acpi/acpica/rscalc.c
index 147feb6aa2a0..4f39bd663099 100644
--- a/drivers/acpi/acpica/rscalc.c
+++ b/drivers/acpi/acpica/rscalc.c
@@ -84,7 +84,7 @@ static u8 acpi_rs_count_set_bits(u16 bit_field)
84 bit_field &= (u16) (bit_field - 1); 84 bit_field &= (u16) (bit_field - 1);
85 } 85 }
86 86
87 return bits_set; 87 return (bits_set);
88} 88}
89 89
90/******************************************************************************* 90/*******************************************************************************
diff --git a/drivers/acpi/acpica/rsutils.c b/drivers/acpi/acpica/rsutils.c
index 441447f238f0..5adae5a036aa 100644
--- a/drivers/acpi/acpica/rsutils.c
+++ b/drivers/acpi/acpica/rsutils.c
@@ -108,7 +108,7 @@ u16 acpi_rs_encode_bitmask(u8 * list, u8 count)
108 mask |= (0x1 << list[i]); 108 mask |= (0x1 << list[i]);
109 } 109 }
110 110
111 return mask; 111 return (mask);
112} 112}
113 113
114/******************************************************************************* 114/*******************************************************************************
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index 285e24b97382..e3cc315d7744 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -147,7 +147,7 @@ acpi_status acpi_tb_initialize_facs(void)
147 ACPI_CAST_INDIRECT_PTR(struct 147 ACPI_CAST_INDIRECT_PTR(struct
148 acpi_table_header, 148 acpi_table_header,
149 &acpi_gbl_FACS)); 149 &acpi_gbl_FACS));
150 return status; 150 return (status);
151} 151}
152#endif /* !ACPI_REDUCED_HARDWARE */ 152#endif /* !ACPI_REDUCED_HARDWARE */
153 153
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index 294692ae76e9..99549eeac0c6 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -785,7 +785,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
785 785
786 status = acpi_os_create_mutex(&dest_desc->mutex.os_mutex); 786 status = acpi_os_create_mutex(&dest_desc->mutex.os_mutex);
787 if (ACPI_FAILURE(status)) { 787 if (ACPI_FAILURE(status)) {
788 return status; 788 return (status);
789 } 789 }
790 break; 790 break;
791 791
@@ -795,7 +795,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
795 &dest_desc->event. 795 &dest_desc->event.
796 os_semaphore); 796 os_semaphore);
797 if (ACPI_FAILURE(status)) { 797 if (ACPI_FAILURE(status)) {
798 return status; 798 return (status);
799 } 799 }
800 break; 800 break;
801 801
diff --git a/drivers/acpi/acpica/utlock.c b/drivers/acpi/acpica/utlock.c
index b1eb7f17e110..8d1a7499e401 100644
--- a/drivers/acpi/acpica/utlock.c
+++ b/drivers/acpi/acpica/utlock.c
@@ -66,11 +66,11 @@ acpi_status acpi_ut_create_rw_lock(struct acpi_rw_lock *lock)
66 lock->num_readers = 0; 66 lock->num_readers = 0;
67 status = acpi_os_create_mutex(&lock->reader_mutex); 67 status = acpi_os_create_mutex(&lock->reader_mutex);
68 if (ACPI_FAILURE(status)) { 68 if (ACPI_FAILURE(status)) {
69 return status; 69 return (status);
70 } 70 }
71 71
72 status = acpi_os_create_mutex(&lock->writer_mutex); 72 status = acpi_os_create_mutex(&lock->writer_mutex);
73 return status; 73 return (status);
74} 74}
75 75
76void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock) 76void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock)
@@ -108,7 +108,7 @@ acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock)
108 108
109 status = acpi_os_acquire_mutex(lock->reader_mutex, ACPI_WAIT_FOREVER); 109 status = acpi_os_acquire_mutex(lock->reader_mutex, ACPI_WAIT_FOREVER);
110 if (ACPI_FAILURE(status)) { 110 if (ACPI_FAILURE(status)) {
111 return status; 111 return (status);
112 } 112 }
113 113
114 /* Acquire the write lock only for the first reader */ 114 /* Acquire the write lock only for the first reader */
@@ -121,7 +121,7 @@ acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock)
121 } 121 }
122 122
123 acpi_os_release_mutex(lock->reader_mutex); 123 acpi_os_release_mutex(lock->reader_mutex);
124 return status; 124 return (status);
125} 125}
126 126
127acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock) 127acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock)
@@ -130,7 +130,7 @@ acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock)
130 130
131 status = acpi_os_acquire_mutex(lock->reader_mutex, ACPI_WAIT_FOREVER); 131 status = acpi_os_acquire_mutex(lock->reader_mutex, ACPI_WAIT_FOREVER);
132 if (ACPI_FAILURE(status)) { 132 if (ACPI_FAILURE(status)) {
133 return status; 133 return (status);
134 } 134 }
135 135
136 /* Release the write lock only for the very last reader */ 136 /* Release the write lock only for the very last reader */
@@ -141,7 +141,7 @@ acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock)
141 } 141 }
142 142
143 acpi_os_release_mutex(lock->reader_mutex); 143 acpi_os_release_mutex(lock->reader_mutex);
144 return status; 144 return (status);
145} 145}
146 146
147/******************************************************************************* 147/*******************************************************************************
@@ -165,7 +165,7 @@ acpi_status acpi_ut_acquire_write_lock(struct acpi_rw_lock *lock)
165 acpi_status status; 165 acpi_status status;
166 166
167 status = acpi_os_acquire_mutex(lock->writer_mutex, ACPI_WAIT_FOREVER); 167 status = acpi_os_acquire_mutex(lock->writer_mutex, ACPI_WAIT_FOREVER);
168 return status; 168 return (status);
169} 169}
170 170
171void acpi_ut_release_write_lock(struct acpi_rw_lock *lock) 171void acpi_ut_release_write_lock(struct acpi_rw_lock *lock)