Skip to content

Commit

Permalink
Merge pull request #1199 from hermit-os/clippy-mmio
Browse files Browse the repository at this point in the history
fix(xtask): run clippy on virtio-mmio configurations
  • Loading branch information
mkroening authored May 15, 2024
2 parents aa951c1 + 9a61d3d commit 7414622
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arch/riscv64/kernel/devicetree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
))
}
Expand Down
2 changes: 1 addition & 1 deletion src/arch/x86_64/kernel/mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions xtask/src/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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=fs,tcp")
.run()?;
cmd!(sh, "cargo clippy --target={triple}")
.arg("--no-default-features")
.arg("--features=acpi,fsgsbase,pci,smp,vga")
Expand Down

0 comments on commit 7414622

Please sign in to comment.