diff options
author | Bob Moore <robert.moore@intel.com> | 2015-07-01 02:45:11 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-07-01 17:17:55 -0400 |
commit | 4fa4616e279df89baeb36287bbee83ab272edaed (patch) | |
tree | 4e50fd71d00dbb6ed9583589a2f65b048bf3a195 /drivers/acpi/acpica/utcopy.c | |
parent | 63c43812ee99efe7903955bae8cd928e9582477a (diff) |
ACPICA: De-macroize calls to standard C library functions
ACPICA commit 3b1026e0bdd3c32eb6d5d313f3ba0b1fee7597b4
ACPICA commit 00f0dc83f5cfca53b27a3213ae0d7719b88c2d6b
ACPICA commit 47d22a738d0e19fd241ffe4e3e9d4e198e4afc69
Across all of ACPICA. Replace C library macros such as ACPI_STRLEN with the
standard names such as strlen. The original purpose for these macros is
long since obsolete.
Also cast various invocations as necessary. Bob Moore, Jung-uk Kim, Lv Zheng.
Link: https://github.com/acpica/acpica/commit/3b1026e0
Link: https://github.com/acpica/acpica/commit/00f0dc83
Link: https://github.com/acpica/acpica/commit/47d22a73
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
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/utcopy.c')
-rw-r--r-- | drivers/acpi/acpica/utcopy.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c index c37ec5035f4c..257221d452c8 100644 --- a/drivers/acpi/acpica/utcopy.c +++ b/drivers/acpi/acpica/utcopy.c | |||
@@ -129,7 +129,7 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, | |||
129 | 129 | ||
130 | /* Always clear the external object */ | 130 | /* Always clear the external object */ |
131 | 131 | ||
132 | ACPI_MEMSET(external_object, 0, sizeof(union acpi_object)); | 132 | memset(external_object, 0, sizeof(union acpi_object)); |
133 | 133 | ||
134 | /* | 134 | /* |
135 | * In general, the external object will be the same type as | 135 | * In general, the external object will be the same type as |
@@ -149,9 +149,9 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, | |||
149 | string. | 149 | string. |
150 | length + 1); | 150 | length + 1); |
151 | 151 | ||
152 | ACPI_MEMCPY((void *)data_space, | 152 | memcpy((void *)data_space, |
153 | (void *)internal_object->string.pointer, | 153 | (void *)internal_object->string.pointer, |
154 | (acpi_size) internal_object->string.length + 1); | 154 | (acpi_size) internal_object->string.length + 1); |
155 | break; | 155 | break; |
156 | 156 | ||
157 | case ACPI_TYPE_BUFFER: | 157 | case ACPI_TYPE_BUFFER: |
@@ -162,9 +162,9 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, | |||
162 | ACPI_ROUND_UP_TO_NATIVE_WORD(internal_object->string. | 162 | ACPI_ROUND_UP_TO_NATIVE_WORD(internal_object->string. |
163 | length); | 163 | length); |
164 | 164 | ||
165 | ACPI_MEMCPY((void *)data_space, | 165 | memcpy((void *)data_space, |
166 | (void *)internal_object->buffer.pointer, | 166 | (void *)internal_object->buffer.pointer, |
167 | internal_object->buffer.length); | 167 | internal_object->buffer.length); |
168 | break; | 168 | break; |
169 | 169 | ||
170 | case ACPI_TYPE_INTEGER: | 170 | case ACPI_TYPE_INTEGER: |
@@ -502,9 +502,9 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, | |||
502 | goto error_exit; | 502 | goto error_exit; |
503 | } | 503 | } |
504 | 504 | ||
505 | ACPI_MEMCPY(internal_object->string.pointer, | 505 | memcpy(internal_object->string.pointer, |
506 | external_object->string.pointer, | 506 | external_object->string.pointer, |
507 | external_object->string.length); | 507 | external_object->string.length); |
508 | 508 | ||
509 | internal_object->string.length = external_object->string.length; | 509 | internal_object->string.length = external_object->string.length; |
510 | break; | 510 | break; |
@@ -517,9 +517,9 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, | |||
517 | goto error_exit; | 517 | goto error_exit; |
518 | } | 518 | } |
519 | 519 | ||
520 | ACPI_MEMCPY(internal_object->buffer.pointer, | 520 | memcpy(internal_object->buffer.pointer, |
521 | external_object->buffer.pointer, | 521 | external_object->buffer.pointer, |
522 | external_object->buffer.length); | 522 | external_object->buffer.length); |
523 | 523 | ||
524 | internal_object->buffer.length = external_object->buffer.length; | 524 | internal_object->buffer.length = external_object->buffer.length; |
525 | 525 | ||
@@ -694,8 +694,8 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
694 | copy_size = sizeof(struct acpi_namespace_node); | 694 | copy_size = sizeof(struct acpi_namespace_node); |
695 | } | 695 | } |
696 | 696 | ||
697 | ACPI_MEMCPY(ACPI_CAST_PTR(char, dest_desc), | 697 | memcpy(ACPI_CAST_PTR(char, dest_desc), |
698 | ACPI_CAST_PTR(char, source_desc), copy_size); | 698 | ACPI_CAST_PTR(char, source_desc), copy_size); |
699 | 699 | ||
700 | /* Restore the saved fields */ | 700 | /* Restore the saved fields */ |
701 | 701 | ||
@@ -725,9 +725,9 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
725 | 725 | ||
726 | /* Copy the actual buffer data */ | 726 | /* Copy the actual buffer data */ |
727 | 727 | ||
728 | ACPI_MEMCPY(dest_desc->buffer.pointer, | 728 | memcpy(dest_desc->buffer.pointer, |
729 | source_desc->buffer.pointer, | 729 | source_desc->buffer.pointer, |
730 | source_desc->buffer.length); | 730 | source_desc->buffer.length); |
731 | } | 731 | } |
732 | break; | 732 | break; |
733 | 733 | ||
@@ -747,9 +747,9 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
747 | 747 | ||
748 | /* Copy the actual string data */ | 748 | /* Copy the actual string data */ |
749 | 749 | ||
750 | ACPI_MEMCPY(dest_desc->string.pointer, | 750 | memcpy(dest_desc->string.pointer, |
751 | source_desc->string.pointer, | 751 | source_desc->string.pointer, |
752 | (acpi_size) source_desc->string.length + 1); | 752 | (acpi_size) source_desc->string.length + 1); |
753 | } | 753 | } |
754 | break; | 754 | break; |
755 | 755 | ||