From fd98c741f54cdac72e6a99dedcc35aa01bbe18c6 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 7 Aug 2024 23:49:16 -0700 Subject: [PATCH] riscv64: fix fdt_position assert The matches!() expression was missing the fdt_postion parameter that it was intended to be checking. BUG=b:358112181 Fixes: 49a6c3cf2ddb ("aarch64: add cmdline param to control FDT address") Change-Id: I53d29ea6c31142d79384c1e312e8d2bdf16b324b Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5772345 Commit-Queue: Frederick Mayle Commit-Queue: Daniel Verkamp Reviewed-by: Frederick Mayle --- riscv64/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscv64/src/lib.rs b/riscv64/src/lib.rs index 2be3de03f7..dc581da210 100644 --- a/riscv64/src/lib.rs +++ b/riscv64/src/lib.rs @@ -369,7 +369,7 @@ impl arch::LinuxArch for Riscv64 { .collect(); assert!( - matches!(None | Some(FdtPosition::AfterPayload)), + matches!(fdt_position, None | Some(FdtPosition::AfterPayload)), "fdt_position={fdt_position:?} not supported" ); let fdt_offset = (kernel_initrd_end + (RISCV64_FDT_ALIGN - 1)) & !(RISCV64_FDT_ALIGN - 1);