1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-24 02:16:19 +04:00

Remove unnecessary code

This commit is contained in:
Stephen Marz 2020-03-13 11:28:39 -04:00
parent eec1047ac9
commit 9524954eb2

View File

@ -355,14 +355,14 @@ pub fn pending(bd: &mut BlockDevice) {
let ref elem = queue.used.ring[bd.ack_used_idx as usize]; let ref elem = queue.used.ring[bd.ack_used_idx as usize];
bd.ack_used_idx = (bd.ack_used_idx + 1) % VIRTIO_RING_SIZE as u16; bd.ack_used_idx = (bd.ack_used_idx + 1) % VIRTIO_RING_SIZE as u16;
let idx = elem.id as usize; let idx = elem.id as usize;
let len = elem.len as usize; let _len = elem.len as usize;
// println!("Elem id = {}, Len = {}", idx, len); // println!("Elem id = {}, Len = {}", idx, len);
let ref desc = queue.desc[idx]; // let ref desc = queue.desc[idx];
// Free the header. // Free the header.
let addr = desc.addr as *const Request; // let addr = desc.addr as *const Request;
// println!("Status returned as {}", (*addr).status.status); // println!("Status returned as {}", (*addr).status.status);
// println!("Freeing {:p}", addr); // println!("Freeing {:p}", addr);
kfree(addr as *mut u8); kfree(queue.desc[idx].addr as *mut u8);
} }
} }
} }