Skip to content

Use safe-mmio crate for MMIO #685

Use safe-mmio crate for MMIO

Use safe-mmio crate for MMIO #685

Triggered via pull request March 12, 2025 10:28
@qwandorqwandor
synchronize #184
safemmio
Status Success
Total duration 1m 12s
Artifacts

main.yml

on: pull_request
Matrix: examples
Fit to window
Zoom out
Zoom in

Annotations

15 warnings
this function has too many arguments (8/7): src/device/sound.rs#L365
warning: this function has too many arguments (8/7) --> src/device/sound.rs:365:5 | 365 | / pub fn pcm_set_params( 366 | | &mut self, 367 | | stream_id: u32, 368 | | buffer_bytes: u32, ... | 373 | | rate: PcmRate, 374 | | ) -> Result { | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
this function has too many arguments (8/7): src/device/gpu.rs#L255
warning: this function has too many arguments (8/7) --> src/device/gpu.rs:255:5 | 255 | / fn update_cursor( 256 | | &mut self, 257 | | resource_id: u32, 258 | | scanout_id: u32, ... | 263 | | is_move: bool, 264 | | ) -> Result { | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
operator precedence can trip the unwary: src/transport/x86_64.rs#L167
warning: operator precedence can trip the unwary --> src/transport/x86_64.rs:167:9 | 167 | (device_features_high as u64) << 32 | device_features_low as u64 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `((device_features_high as u64) << 32) | device_features_low as u64` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
operator precedence can trip the unwary: src/transport/pci/bus.rs#L133
warning: operator precedence can trip the unwary --> src/transport/pci/bus.rs:133:13 | 133 | / bdf << match self { 134 | | Cam::MmioCam => 8, 135 | | Cam::Ecam => 12, 136 | | } | register_offset as u32; | |______________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence help: consider parenthesizing your expression | 133 ~ (bdf << match self { 134 + Cam::MmioCam => 8, 135 + Cam::Ecam => 12, 136 ~ }) | register_offset as u32; |
operator precedence can trip the unwary: src/transport/pci/bus.rs#L129
warning: operator precedence can trip the unwary --> src/transport/pci/bus.rs:129:19 | 129 | let bdf = (device_function.bus as u32) << 8 | ___________________^ 130 | | | (device_function.device as u32) << 3 | |__________________________________________________^ help: consider parenthesizing your expression: `((device_function.bus as u32) << 8) | ((device_function.device as u32) << 3)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
operator precedence can trip the unwary: src/device/socket/vsock.rs#L253
warning: operator precedence can trip the unwary --> src/device/socket/vsock.rs:253:17 | 253 | / read_config!(transport, VirtioVsockConfig, guest_cid_low)? as u64 254 | | | (read_config!(transport, VirtioVsockConfig, guest_cid_high)? as u64) << 32, | |________________________________________________________________________________________________^ help: consider parenthesizing your expression: `read_config!(transport, VirtioVsockConfig, guest_cid_low)? as u64 | ((read_config!(transport, VirtioVsockConfig, guest_cid_high)? as u64) << 32)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
operator precedence can trip the unwary: src/device/blk.rs#L59
warning: operator precedence can trip the unwary --> src/device/blk.rs:59:16 | 59 | Ok(read_config!(transport, BlkConfig, capacity_low)? as u64 | ________________^ 60 | | | (read_config!(transport, BlkConfig, capacity_high)? as u64) << 32) | |___________________________________________________________________________________^ help: consider parenthesizing your expression: `read_config!(transport, BlkConfig, capacity_low)? as u64 | ((read_config!(transport, BlkConfig, capacity_high)? as u64) << 32)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence = note: `#[warn(clippy::precedence)]` on by default
build: src/config.rs#L100
unused macro definition: `write_config`
build: src/config.rs#L114
unused import: `write_config`
build: src/queue.rs#L80
unused variable: `indirect`
build
`virtio-drivers` (lib) generated 3 warnings (run `cargo fix --lib -p virtio-drivers` to apply 1 suggestion)
build: src/config.rs#L100
unused macro definition: `write_config`
build: src/config.rs#L114
unused import: `write_config`
build: src/queue.rs#L80
unused variable: `indirect`
build
`virtio-drivers` (lib) generated 3 warnings (run `cargo fix --lib -p virtio-drivers` to apply 1 suggestion)