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: 49a6c3cf2d ("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 <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Frederick Mayle <fmayle@google.com>
This commit is contained in:
Daniel Verkamp 2024-08-07 23:49:16 -07:00 committed by crosvm LUCI
parent 3fd867db6a
commit fd98c741f5

View file

@ -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);