From 10682cf9a1e34d0fb123e4d168ba74471dd70651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 15 May 2024 18:20:30 +0200 Subject: [PATCH 1/3] fix(x86_64/mmio): clippy::len_zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- src/arch/x86_64/kernel/mmio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86_64/kernel/mmio.rs b/src/arch/x86_64/kernel/mmio.rs index 30438e8338..ecc8e47130 100644 --- a/src/arch/x86_64/kernel/mmio.rs +++ b/src/arch/x86_64/kernel/mmio.rs @@ -196,7 +196,7 @@ fn guess_device() -> Result<(&'static mut MmioRegisterLayout, u8), &'static str> fn detect_network() -> Result<(&'static mut MmioRegisterLayout, u8), &'static str> { let linux_mmio = env::mmio(); - if linux_mmio.len() > 0 { + if !linux_mmio.is_empty() { check_linux_args(linux_mmio) } else { guess_device() From ef53d0b20070542a36ba597073ffcc7dab85c664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 15 May 2024 18:21:02 +0200 Subject: [PATCH 2/3] fix(riscv64): compilation with virtio-mmio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- src/arch/riscv64/kernel/devicetree.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/riscv64/kernel/devicetree.rs b/src/arch/riscv64/kernel/devicetree.rs index 5681c6e3c3..45380af9da 100644 --- a/src/arch/riscv64/kernel/devicetree.rs +++ b/src/arch/riscv64/kernel/devicetree.rs @@ -220,7 +220,7 @@ pub fn init_drivers() { if let Ok(VirtioDriver::Network(drv)) = mmio_virtio::init_device(mmio, irq.try_into().unwrap()) { - mmio::register_driver(MmioDriver::VirtioNet( + register_driver(MmioDriver::VirtioNet( hermit_sync::InterruptSpinMutex::new(drv), )) } From f27e4328f5bd7334361f61c94a0b66a18cb24ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 15 May 2024 18:21:41 +0200 Subject: [PATCH 3/3] fix(xtask): run clippy on virtio-mmio configurations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- xtask/src/clippy.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xtask/src/clippy.rs b/xtask/src/clippy.rs index 324044b557..2114e0fa8a 100644 --- a/xtask/src/clippy.rs +++ b/xtask/src/clippy.rs @@ -20,6 +20,10 @@ impl Clippy { cmd!(sh, "cargo clippy --target={triple}") .arg("--no-default-features") .run()?; + cmd!(sh, "cargo clippy --target={triple}") + .arg("--no-default-features") + .arg("--features=tcp") + .run()?; cmd!(sh, "cargo clippy --target={triple}") .arg("--no-default-features") .arg("--features=acpi,fsgsbase,pci,smp,vga")