Skip to content

Commit 22335e7

Browse files
committed
queue: refine documentation a bit
Refine documentation a bit. Signed-off-by: Liu Jiang <[email protected]>
1 parent ac06b7e commit 22335e7

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

coverage_config_x86_64.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"coverage_score": 90.6,
2+
"coverage_score": 91.1,
33
"exclude_path": "",
44
"crate_features": "virtio-blk/backend-stdio"
55
}

crates/virtio-queue/src/lib.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
1212

13-
//! A crate that exposes the virtio queue API.
13+
//! Virtio queue API for backend device drivers to access virtio queues.
1414
1515
#![deny(missing_docs)]
1616

@@ -28,17 +28,16 @@ use std::ops::{Deref, DerefMut};
2828
use std::sync::atomic::{fence, Ordering};
2929
use std::sync::{Arc, Mutex, MutexGuard};
3030

31-
use defs::{
32-
VIRTQ_AVAIL_ELEMENT_SIZE, VIRTQ_AVAIL_RING_HEADER_SIZE, VIRTQ_AVAIL_RING_META_SIZE,
33-
VIRTQ_DESCRIPTOR_SIZE, VIRTQ_DESC_F_INDIRECT, VIRTQ_DESC_F_NEXT, VIRTQ_DESC_F_WRITE,
34-
VIRTQ_USED_ELEMENT_SIZE, VIRTQ_USED_F_NO_NOTIFY, VIRTQ_USED_RING_META_SIZE,
35-
};
36-
31+
use log::error;
3732
use vm_memory::{
3833
Address, ByteValued, Bytes, GuestAddress, GuestAddressSpace, GuestMemory, GuestMemoryError,
3934
};
4035

41-
use log::error;
36+
use self::defs::{
37+
VIRTQ_AVAIL_ELEMENT_SIZE, VIRTQ_AVAIL_RING_HEADER_SIZE, VIRTQ_AVAIL_RING_META_SIZE,
38+
VIRTQ_DESCRIPTOR_SIZE, VIRTQ_DESC_F_INDIRECT, VIRTQ_DESC_F_NEXT, VIRTQ_DESC_F_WRITE,
39+
VIRTQ_USED_ELEMENT_SIZE, VIRTQ_USED_F_NO_NOTIFY, VIRTQ_USED_RING_META_SIZE,
40+
};
4241

4342
/// Virtio Queue related errors.
4443
#[derive(Debug)]
@@ -71,7 +70,7 @@ impl Display for Error {
7170

7271
impl std::error::Error for Error {}
7372

74-
/// A virtio descriptor constraints with C representation
73+
/// A virtio descriptor constraints with C representation.
7574
#[repr(C)]
7675
#[derive(Default, Clone, Copy, Debug)]
7776
pub struct Descriptor {

0 commit comments

Comments
 (0)