|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] dom0less: Remove redundant magic check in 'check_partial_fdt()'
commit b27eedee70657e54fc05d29502415e1eb3ac3661
Author: Dmytro Prokopchuk1 <dmytro_prokopchuk1@xxxxxxxx>
AuthorDate: Mon Nov 10 10:59:29 2025 +0000
Commit: Julien Grall <julien@xxxxxxx>
CommitDate: Sun Nov 16 12:26:37 2025 +0000
dom0less: Remove redundant magic check in 'check_partial_fdt()'
The function 'check_partial_fdt()' performs an explicit check for the FDT
magic number (FDT_MAGIC) before calling 'fdt_check_header(). This check is
redundant, because 'fdt_check_header()' includes checking the magic number.
Remove the redundant check to simplify the code and rely on the library
function to perform header validation.
Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
---
xen/common/device-tree/dom0less-build.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/xen/common/device-tree/dom0less-build.c
b/xen/common/device-tree/dom0less-build.c
index 9fd004c42a..2600350a3c 100644
--- a/xen/common/device-tree/dom0less-build.c
+++ b/xen/common/device-tree/dom0less-build.c
@@ -359,12 +359,6 @@ static int __init check_partial_fdt(void *pfdt, size_t
size)
{
int res;
- if ( fdt_magic(pfdt) != FDT_MAGIC )
- {
- dprintk(XENLOG_ERR, "Partial FDT is not a valid Flat Device Tree");
- return -EINVAL;
- }
-
res = fdt_check_header(pfdt);
if ( res )
{
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |