[PATCH] test: cmd: fdt: Drop unused fdt_test_header_get() fdt parameter
Marek Vasut
marek.vasut+renesas at mailbox.org
Sat Mar 11 17:28:46 CET 2023
The 'fdt' parameter is not used anywhere in the function, drop it.
This also should fix the following compiler warning in sandbox_spl:
test/cmd/fdt.c:1159:9: warning: 'fdt_test_header_get' accessing 4096 bytes in a region of size 256 [-Wstringop-overflow=]
Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
---
test/cmd/fdt.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
index ebe411f5b67..22e8c7e3d26 100644
--- a/test/cmd/fdt.c
+++ b/test/cmd/fdt.c
@@ -1112,7 +1112,7 @@ static int fdt_test_bootcpu(struct unit_test_state *uts)
}
FDT_TEST(fdt_test_bootcpu, UT_TESTF_CONSOLE_REC);
-static int fdt_test_header_get(struct unit_test_state *uts, char fdt[4096],
+static int fdt_test_header_get(struct unit_test_state *uts,
const char *field, const unsigned long val)
{
/* Test getting valid header entry */
@@ -1156,16 +1156,16 @@ static int fdt_test_header(struct unit_test_state *uts)
ut_assertok(ut_check_console_end(uts));
/* Test header get */
- fdt_test_header_get(uts, fdt, "magic", fdt_magic(fdt));
- fdt_test_header_get(uts, fdt, "totalsize", fdt_totalsize(fdt));
- fdt_test_header_get(uts, fdt, "off_dt_struct", fdt_off_dt_struct(fdt));
- fdt_test_header_get(uts, fdt, "off_dt_strings", fdt_off_dt_strings(fdt));
- fdt_test_header_get(uts, fdt, "off_mem_rsvmap", fdt_off_mem_rsvmap(fdt));
- fdt_test_header_get(uts, fdt, "version", fdt_version(fdt));
- fdt_test_header_get(uts, fdt, "last_comp_version", fdt_last_comp_version(fdt));
- fdt_test_header_get(uts, fdt, "boot_cpuid_phys", fdt_boot_cpuid_phys(fdt));
- fdt_test_header_get(uts, fdt, "size_dt_strings", fdt_size_dt_strings(fdt));
- fdt_test_header_get(uts, fdt, "size_dt_struct", fdt_size_dt_struct(fdt));
+ fdt_test_header_get(uts, "magic", fdt_magic(fdt));
+ fdt_test_header_get(uts, "totalsize", fdt_totalsize(fdt));
+ fdt_test_header_get(uts, "off_dt_struct", fdt_off_dt_struct(fdt));
+ fdt_test_header_get(uts, "off_dt_strings", fdt_off_dt_strings(fdt));
+ fdt_test_header_get(uts, "off_mem_rsvmap", fdt_off_mem_rsvmap(fdt));
+ fdt_test_header_get(uts, "version", fdt_version(fdt));
+ fdt_test_header_get(uts, "last_comp_version", fdt_last_comp_version(fdt));
+ fdt_test_header_get(uts, "boot_cpuid_phys", fdt_boot_cpuid_phys(fdt));
+ fdt_test_header_get(uts, "size_dt_strings", fdt_size_dt_strings(fdt));
+ fdt_test_header_get(uts, "size_dt_struct", fdt_size_dt_struct(fdt));
return 0;
}
--
2.39.2
More information about the U-Boot
mailing list