diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-02 21:50:45 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-02 21:50:45 +1000 |
commit | cb38fa23c17519faf46a76d2f71a8430705fe474 (patch) | |
tree | 8a2a4ac0c4d8091cc15216871bc74e98337bfa41 /drivers/block | |
parent | 81473132878f8a1d0c6a78cffa0cf84c8a19c1be (diff) | |
download | linux-3.10-cb38fa23c17519faf46a76d2f71a8430705fe474.tar.gz linux-3.10-cb38fa23c17519faf46a76d2f71a8430705fe474.tar.bz2 linux-3.10-cb38fa23c17519faf46a76d2f71a8430705fe474.zip |
virtio: de-structify virtio_block status byte
Ron Minnich points out that a struct containing a char is not always
sizeof(char); simplest to remove the structure to avoid confusion.
Cc: "ron minnich" <rminnich@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/virtio_blk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0cfbe8c594a..fb283af3802 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -35,7 +35,7 @@ struct virtblk_req struct list_head list; struct request *req; struct virtio_blk_outhdr out_hdr; - struct virtio_blk_inhdr in_hdr; + u8 status; }; static void blk_done(struct virtqueue *vq) @@ -48,7 +48,7 @@ static void blk_done(struct virtqueue *vq) spin_lock_irqsave(&vblk->lock, flags); while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) { int uptodate; - switch (vbr->in_hdr.status) { + switch (vbr->status) { case VIRTIO_BLK_S_OK: uptodate = 1; break; @@ -101,7 +101,7 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk, sg_init_table(vblk->sg, VIRTIO_MAX_SG); sg_set_buf(&vblk->sg[0], &vbr->out_hdr, sizeof(vbr->out_hdr)); num = blk_rq_map_sg(q, vbr->req, vblk->sg+1); - sg_set_buf(&vblk->sg[num+1], &vbr->in_hdr, sizeof(vbr->in_hdr)); + sg_set_buf(&vblk->sg[num+1], &vbr->status, sizeof(vbr->status)); if (rq_data_dir(vbr->req) == WRITE) { vbr->out_hdr.type |= VIRTIO_BLK_T_OUT; |