Skip to content

Commit

Permalink
Merge pull request #154 from rcore-os/release
Browse files Browse the repository at this point in the history
Prepare for 0.7.5 release
  • Loading branch information
qwandor authored Jul 30, 2024
2 parents 0b1383c + e112965 commit a9487f2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
[package]
name = "virtio-drivers"
version = "0.7.4"
version = "0.7.5"
license = "MIT"
authors = [
"Jiajie Chen <[email protected]>",
"Runji Wang <[email protected]>",
"Yuekai Jia <[email protected]>",
"Andrew Walbran <[email protected]>",
]
edition = "2018"
edition = "2021"
description = "VirtIO guest drivers."
repository = "https://github.com/rcore-os/virtio-drivers"
keywords = ["virtio"]
categories = ["hardware-support", "no-std"]

[dependencies]
log = "0.4"
bitflags = "2.3.0"
enumn = "0.1.13"
zerocopy = { version = "0.7.5", features = ["derive"] }
log = "0.4.22"
bitflags = "2.6.0"
enumn = "0.1.14"
zerocopy = { version = "0.7.35", features = ["derive"] }

[features]
default = ["alloc"]
alloc = ["zerocopy/alloc"]

[dev-dependencies]
zerocopy = { version = "0.7.5", features = ["alloc"] }
zerocopy = { version = "0.7.35", features = ["alloc"] }
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/riscv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "riscv"
version = "0.1.0"
authors = ["Runji Wang <[email protected]>"]
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
4 changes: 2 additions & 2 deletions examples/riscv/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fn virtio_sound<T: Transport>(transport: T) {
let mut sound =
VirtIOSound::<HalImpl, T>::new(transport).expect("failed to create sound driver");
let output_streams = sound.output_streams().unwrap();
if output_streams.len() > 0 {
if !output_streams.is_empty() {
let output_stream_id = *output_streams.first().unwrap();
let rates = sound.rates_supported(output_stream_id).unwrap();
let formats = sound.formats_supported(output_stream_id).unwrap();
Expand All @@ -204,7 +204,7 @@ fn virtio_sound<T: Transport>(transport: T) {
PcmFormat::U32
};
let channel = if channel_range.contains(&2) {
2 as u8
2
} else {
*channel_range.start()
};
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions src/device/sound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,12 @@ impl<H: Hal, T: Transport> VirtIOSound<H, T> {
if self.tx_queue.should_notify() {
self.transport.notify(TX_QUEUE_IDX);
}
info!("Added buffer, head = {}, token = {}", head, tokens[head]);
buffers[head] = Some(buffer);
head += 1;
if head >= usize::from(QUEUE_SIZE) {
head = 0;
}
} else if head == tail {
info!("head = {head}, tail = {tail}, breaking");
break;
}
}
Expand All @@ -549,7 +547,6 @@ impl<H: Hal, T: Transport> VirtIOSound<H, T> {
&mut [statuses[tail].as_bytes_mut()],
)?;
}
info!("Popped buffer, tail = {}, token = {}", tail, tokens[tail]);
if statuses[tail].status != CommandCode::SOk.into() {
return Err(Error::IoError);
}
Expand Down

0 comments on commit a9487f2

Please sign in to comment.