[PATCH] acpi: iort: constify some function arguments

Colin King colin.king at canonical.com
Wed Sep 22 10:17:18 UTC 2021


From: Colin Ian King <colin.king at canonical.com>

Some of the pointer arguments can be constified, cleans up
cppcheck warnings.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpi/iort/iort.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/acpi/iort/iort.c b/src/acpi/iort/iort.c
index 9881bf94..f2a8a062 100644
--- a/src/acpi/iort/iort.c
+++ b/src/acpi/iort/iort.c
@@ -122,7 +122,7 @@ static void iort_id_mapping_dump(
 static void iort_id_mappings_dump(
 	fwts_framework *fw,
 	uint8_t *data,
-	uint8_t *data_end)
+	const uint8_t *data_end)
 {
 	uint32_t i;
 	fwts_acpi_table_iort_node *node = (fwts_acpi_table_iort_node *)data;
@@ -144,7 +144,7 @@ static void iort_id_mappings_dump(
 static void iort_id_mappings_check(
 	fwts_framework *fw,
 	uint8_t *data,
-	uint8_t *data_end,
+	const uint8_t *data_end,
 	bool *passed)
 {
 	uint32_t i;
@@ -181,7 +181,7 @@ static void iort_id_mappings_check(
 static void iort_smmu_interrupt_dump(
 	fwts_framework *fw,
 	uint8_t *data,
-	uint8_t *data_end,
+	const uint8_t *data_end,
 	uint32_t offset,
 	uint32_t count)
 {
@@ -219,7 +219,7 @@ static void iort_smmu_interrupt_flags_check(
 static void iort_smmu_interrupt_check(
 	fwts_framework *fw,
 	uint8_t *data,
-	uint8_t *data_end,
+	const uint8_t *data_end,
 	uint32_t offset,
 	uint32_t count,
 	bool *passed)
@@ -255,7 +255,7 @@ static void iort_smmu_interrupt_check(
 static void iort_smmu_global_interrupt_dump(
 	fwts_framework *fw,
 	uint8_t *data,
-	uint8_t *data_end,
+	const uint8_t *data_end,
 	uint32_t offset)
 {
 	fwts_acpi_table_iort_smmu_global_interrupt_array *intr =
@@ -276,7 +276,7 @@ static void iort_smmu_global_interrupt_dump(
 static void iort_smmu_global_interrupt_check(
 	fwts_framework *fw,
 	uint8_t *data,
-	uint8_t *data_end,
+	const uint8_t *data_end,
 	uint32_t offset,
 	bool *passed)
 {
@@ -310,7 +310,7 @@ static void iort_smmu_global_interrupt_check(
 static void iort_check_its_group(
 	fwts_framework *fw,
 	uint8_t *data,
-	uint8_t *node_end,
+	const uint8_t *node_end,
 	bool *passed)
 {
 	fwts_acpi_table_iort_its_group_node *node =
-- 
2.32.0




More information about the fwts-devel mailing list