Skip to content

Commit

Permalink
ref(types): remove register offset field from BaoIoRequest
Browse files Browse the repository at this point in the history
This commit removes the register offset (reg_off) field from
BaoIoRequest struct since we already have the full address
(addr field).

Signed-off-by: joaopeixoto13 <[email protected]>
  • Loading branch information
joaopeixoto13 committed May 5, 2024
1 parent 80b8d0c commit 904ec8a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/api/src/device_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ impl BaoDeviceModel {
// Create a new I/O request
let mut request = BaoIoRequest {
virtio_id: 0,
reg_off: 0,
addr: 0,
op: BAO_IO_ASK,
value: 0,
Expand Down
4 changes: 2 additions & 2 deletions src/api/src/ioctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ mod tests {
assert_eq!(0x0000_A603, BAO_IOCTL_IO_CREATE_CLIENT());
assert_eq!(0x0000_A604, BAO_IOCTL_IO_DESTROY_CLIENT());
assert_eq!(0x0000_A605, BAO_IOCTL_IO_ATTACH_CLIENT());
assert_eq!(0xC048_A606, BAO_IOCTL_IO_REQUEST());
assert_eq!(0x4048_A607, BAO_IOCTL_IO_REQUEST_NOTIFY_COMPLETED());
assert_eq!(0xC040_A606, BAO_IOCTL_IO_REQUEST());
assert_eq!(0x4040_A607, BAO_IOCTL_IO_REQUEST_NOTIFY_COMPLETED());
assert_eq!(0x0000_A608, BAO_IOCTL_IO_NOTIFY_GUEST());
assert_eq!(0x4020_A609, BAO_IOCTL_IOEVENTFD());
assert_eq!(0x4008_A60A, BAO_IOCTL_IRQFD());
Expand Down
2 changes: 0 additions & 2 deletions src/api/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use serde::{Deserialize, Serialize};
/// # Attributes
///
/// * `virtio_id` - Virtio instance ID.
/// * `reg_off` - Register offset.
/// * `addr` - Address.
/// * `op` - Operation.
/// * `value` - Value.
Expand All @@ -26,7 +25,6 @@ use serde::{Deserialize, Serialize};
#[derive(Debug)]
pub struct BaoIoRequest {
pub virtio_id: u64,
pub reg_off: u64,
pub addr: u64,
pub op: u64,
pub value: u64,
Expand Down

0 comments on commit 904ec8a

Please sign in to comment.