Skip to content

Commit f2b4b10

Browse files
committed
kernel/platform: Use PageSize conditionally
The PageSize definition is only used when debug_assertions is set, which triggers a compile warning in release builds. Make the inclusion of PageSize dependent on debug_assertions as well. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
1 parent e6474ec commit f2b4b10

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

kernel/src/platform/native.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ use crate::hyperv::hyperv_start_cpu;
2727
use crate::io::{DEFAULT_IO_DRIVER, IOPort};
2828
use crate::mm::PerCPUMapping;
2929
use crate::mm::TransitionPageTable;
30-
use crate::types::{PAGE_SIZE, PageSize};
30+
use crate::types::PAGE_SIZE;
31+
#[cfg(debug_assertions)]
32+
use crate::types::PageSize;
3133
use crate::utils::MemoryRegion;
3234

3335
use bootdefs::kernel_launch::ApStartContext;

0 commit comments

Comments
 (0)