aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rsutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/resources/rsutils.c')
-rw-r--r--drivers/acpi/resources/rsutils.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c
index a1eac0f1df54..2236a0c90daa 100644
--- a/drivers/acpi/resources/rsutils.c
+++ b/drivers/acpi/resources/rsutils.c
@@ -152,18 +152,18 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type)
152 * misaligned memory transfers 152 * misaligned memory transfers
153 */ 153 */
154 case ACPI_RSC_MOVE16: 154 case ACPI_RSC_MOVE16:
155 ACPI_MOVE_16_TO_16(&((u16 *) destination)[i], 155 ACPI_MOVE_16_TO_16(&ACPI_CAST_PTR(u16, destination)[i],
156 &((u16 *) source)[i]); 156 &ACPI_CAST_PTR(u16, source)[i]);
157 break; 157 break;
158 158
159 case ACPI_RSC_MOVE32: 159 case ACPI_RSC_MOVE32:
160 ACPI_MOVE_32_TO_32(&((u32 *) destination)[i], 160 ACPI_MOVE_32_TO_32(&ACPI_CAST_PTR(u32, destination)[i],
161 &((u32 *) source)[i]); 161 &ACPI_CAST_PTR(u32, source)[i]);
162 break; 162 break;
163 163
164 case ACPI_RSC_MOVE64: 164 case ACPI_RSC_MOVE64:
165 ACPI_MOVE_64_TO_64(&((u64 *) destination)[i], 165 ACPI_MOVE_64_TO_64(&ACPI_CAST_PTR(u64, destination)[i],
166 &((u64 *) source)[i]); 166 &ACPI_CAST_PTR(u64, source)[i]);
167 break; 167 break;
168 168
169 default: 169 default:
@@ -318,7 +318,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
318 318
319 total_length = 319 total_length =
320 resource_length + sizeof(struct aml_resource_large_header); 320 resource_length + sizeof(struct aml_resource_large_header);
321 aml_resource_source = ((u8 *) aml) + minimum_length; 321 aml_resource_source = ACPI_ADD_PTR(u8, aml, minimum_length);
322 322
323 /* 323 /*
324 * resource_source is present if the length of the descriptor is longer than 324 * resource_source is present if the length of the descriptor is longer than
@@ -338,9 +338,9 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
338 * String destination pointer is not specified; Set the String 338 * String destination pointer is not specified; Set the String
339 * pointer to the end of the current resource_source structure. 339 * pointer to the end of the current resource_source structure.
340 */ 340 */
341 resource_source->string_ptr = (char *) 341 resource_source->string_ptr =
342 ((u8 *) resource_source) + 342 ACPI_ADD_PTR(char, resource_source,
343 sizeof(struct acpi_resource_source); 343 sizeof(struct acpi_resource_source));
344 } 344 }
345 345
346 /* 346 /*
@@ -407,7 +407,7 @@ acpi_rs_set_resource_source(union aml_resource * aml,
407 if (resource_source->string_length) { 407 if (resource_source->string_length) {
408 /* Point to the end of the AML descriptor */ 408 /* Point to the end of the AML descriptor */
409 409
410 aml_resource_source = ((u8 *) aml) + minimum_length; 410 aml_resource_source = ACPI_ADD_PTR(u8, aml, minimum_length);
411 411
412 /* Copy the resource_source_index */ 412 /* Copy the resource_source_index */
413 413