aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rsdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/resources/rsdump.c')
-rw-r--r--drivers/acpi/resources/rsdump.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c
index f617ca80c5a6..cebd890d3db5 100644
--- a/drivers/acpi/resources/rsdump.c
+++ b/drivers/acpi/resources/rsdump.c
@@ -383,7 +383,7 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
383 383
384 while (count) { 384 while (count) {
385 previous_target = target; 385 previous_target = target;
386 target = ((u8 *) resource) + table->offset; 386 target = ACPI_ADD_PTR(u8, resource, table->offset);
387 name = table->name; 387 name = table->name;
388 388
389 switch (table->opcode) { 389 switch (table->opcode) {
@@ -410,22 +410,19 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
410 /* Data items, 8/16/32/64 bit */ 410 /* Data items, 8/16/32/64 bit */
411 411
412 case ACPI_RSD_UINT8: 412 case ACPI_RSD_UINT8:
413 acpi_rs_out_integer8(name, *ACPI_CAST_PTR(u8, target)); 413 acpi_rs_out_integer8(name, ACPI_GET8(target));
414 break; 414 break;
415 415
416 case ACPI_RSD_UINT16: 416 case ACPI_RSD_UINT16:
417 acpi_rs_out_integer16(name, 417 acpi_rs_out_integer16(name, ACPI_GET16(target));
418 *ACPI_CAST_PTR(u16, target));
419 break; 418 break;
420 419
421 case ACPI_RSD_UINT32: 420 case ACPI_RSD_UINT32:
422 acpi_rs_out_integer32(name, 421 acpi_rs_out_integer32(name, ACPI_GET32(target));
423 *ACPI_CAST_PTR(u32, target));
424 break; 422 break;
425 423
426 case ACPI_RSD_UINT64: 424 case ACPI_RSD_UINT64:
427 acpi_rs_out_integer64(name, 425 acpi_rs_out_integer64(name, ACPI_GET64(target));
428 *ACPI_CAST_PTR(u64, target));
429 break; 426 break;
430 427
431 /* Flags: 1-bit and 2-bit flags supported */ 428 /* Flags: 1-bit and 2-bit flags supported */
@@ -462,8 +459,8 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table)
462 * Note: The list length is obtained from the previous table entry 459 * Note: The list length is obtained from the previous table entry
463 */ 460 */
464 if (previous_target) { 461 if (previous_target) {
465 acpi_rs_dump_byte_list(*ACPI_CAST_PTR 462 acpi_rs_dump_byte_list(ACPI_GET16
466 (u16, previous_target), 463 (previous_target),
467 target); 464 target);
468 } 465 }
469 break; 466 break;
@@ -634,7 +631,7 @@ void acpi_rs_dump_resource_list(struct acpi_resource *resource_list)
634 /* Point to the next resource structure */ 631 /* Point to the next resource structure */
635 632
636 resource_list = 633 resource_list =
637 ACPI_PTR_ADD(struct acpi_resource, resource_list, 634 ACPI_ADD_PTR(struct acpi_resource, resource_list,
638 resource_list->length); 635 resource_list->length);
639 636
640 /* Exit when END_TAG descriptor is reached */ 637 /* Exit when END_TAG descriptor is reached */
@@ -675,9 +672,8 @@ void acpi_rs_dump_irq_list(u8 * route_table)
675 count); 672 count);
676 acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt); 673 acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
677 674
678 prt_element = ACPI_CAST_PTR(struct acpi_pci_routing_table, 675 prt_element = ACPI_ADD_PTR(struct acpi_pci_routing_table,
679 ((u8 *) prt_element) + 676 prt_element, prt_element->length);
680 prt_element->length);
681 } 677 }
682} 678}
683 679