[PATCH] acpi: pptt: move scope of index variable 'i'.
Colin King
colin.king at canonical.com
Tue Jan 23 12:28:18 UTC 2018
From: Colin Ian King <colin.king at canonical.com>
The scope of variable i can be moved to a deeper scope, cleans up
cppcheck style warning.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpi/pptt/pptt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/acpi/pptt/pptt.c b/src/acpi/pptt/pptt.c
index 8ef53b8c..7668974d 100644
--- a/src/acpi/pptt/pptt.c
+++ b/src/acpi/pptt/pptt.c
@@ -41,8 +41,6 @@ static int pptt_init(fwts_framework *fw)
static void pptt_processor_test(fwts_framework *fw, const fwts_acpi_table_pptt_processor *entry, bool *passed)
{
- uint32_t i;
-
fwts_log_info_verbatim(fw, " Processor hierarchy node structure (Type 0):");
fwts_log_info_verbatim(fw, " Type: 0x%2.2" PRIx8, entry->header.type);
fwts_log_info_verbatim(fw, " Length: 0x%2.2" PRIx8, entry->header.length);
@@ -53,6 +51,8 @@ static void pptt_processor_test(fwts_framework *fw, const fwts_acpi_table_pptt_p
fwts_log_info_verbatim(fw, " Number of Private Resources: 0x%8.8" PRIx32, entry->number_priv_resources);
if ((entry->header.length - sizeof(fwts_acpi_table_pptt_processor)) / 4 == entry->number_priv_resources) {
+ uint32_t i;
+
for (i = 0; i < entry->number_priv_resources; i++)
fwts_log_info_verbatim(fw, " Private Resources[%d]: 0x%8.8" PRIx32, i, entry->private_resource[i]);
} else {
--
2.15.1
More information about the fwts-devel
mailing list