From 3278675567dfb901d831d46849c386a4f932905e Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Mon, 8 Apr 2019 13:42:25 -0700 Subject: ACPICA: Rename nameseg length macro/define for clarity ACPICA commit 24870bd9e73d71e2a1ff0a1e94519f8f8409e57d ACPI_NAME_SIZE changed to ACPI_NAMESEG_SIZE This clarifies that this is the length of an individual nameseg, not the length of a generic namestring/namepath. Improves understanding of the code. Link: https://github.com/acpica/acpica/commit/24870bd9 Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsutils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/acpi/acpica/nsutils.c') diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index 6f5940b02a4f..6bc90d46db5c 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c @@ -178,7 +178,7 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) } } - info->length = (ACPI_NAME_SIZE * info->num_segments) + + info->length = (ACPI_NAMESEG_SIZE * info->num_segments) + 4 + info->num_carats; info->next_external_char = next_external_char; @@ -249,7 +249,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) /* Build the name (minus path separators) */ for (; num_segments; num_segments--) { - for (i = 0; i < ACPI_NAME_SIZE; i++) { + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) { if (ACPI_IS_PATH_SEPARATOR(*external_name) || (*external_name == 0)) { @@ -274,7 +274,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) /* Move on the next segment */ external_name++; - result += ACPI_NAME_SIZE; + result += ACPI_NAMESEG_SIZE; } /* Terminate the string */ @@ -493,8 +493,8 @@ acpi_ns_externalize_name(u32 internal_name_length, &internal_name[names_index]); acpi_ut_repair_name(&(*converted_name)[j]); - j += ACPI_NAME_SIZE; - names_index += ACPI_NAME_SIZE; + j += ACPI_NAMESEG_SIZE; + names_index += ACPI_NAMESEG_SIZE; } } -- cgit v1.2.3