xen/arm: Use FDT_MAGIC from libfdt instead of local macro

Remove the redundant local 'DTB_MAGIC' definition and replace its usage
with the canonical 'FDT_MAGIC' from 'libfdt'.

Amends: 66edeb2e39 (arm: copy DTB appended to zImage)
Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
Dmytro Prokopchuk1 authored and Julien Grall committed 2025-11-16 12:19:02 +00:00
1 parent a71f56be01
commit c53f71b2ee
1 file changed
+1 -3
+1 -3
View File
@@ -40,8 +40,6 @@ struct minimal_dtb_header {
/* There are other fields but we don't use them yet. */
};
#define DTB_MAGIC 0xd00dfeedU
static void __init place_modules(struct kernel_info *info,
paddr_t kernbase, paddr_t kernend)
{
@@ -383,7 +381,7 @@ static int __init kernel_zimage32_probe(struct kernel_info *info,
if ( addr + end - start + sizeof(dtb_hdr) <= size )
{
copy_from_paddr(&dtb_hdr, addr + end - start, sizeof(dtb_hdr));
if (be32_to_cpu(dtb_hdr.magic) == DTB_MAGIC) {
if (be32_to_cpu(dtb_hdr.magic) == FDT_MAGIC) {
end += be32_to_cpu(dtb_hdr.total_size);
if ( end > addr + size )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.