aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2010-06-18 06:10:18 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:22:26 -0400
commit15fa6e81650a167f82dc0d478f290f1cffa9183d (patch)
tree3f7c13c2bd7f8b330c9820641dd253f23c89ef07 /drivers/block
parent7b6d91daee5cac6402186ff224c3af39d79f4a0e (diff)
virtio_blk: add default case to cmd type switch
On compilation, gcc correctly detects that we do not handle all types: In function ‘blk_done’: warning: enumeration value ‘REQ_TYPE_FS’ not handled in switch warning: enumeration value ‘REQ_TYPE_SENSE’ not handled in switch warning: enumeration value ‘REQ_TYPE_PM_SUSPEND’ not handled in switch warning: enumeration value ‘REQ_TYPE_PM_RESUME’ not handled in switch warning: enumeration value ‘REQ_TYPE_PM_SHUTDOWN’ not handled in switch warning: enumeration value ‘REQ_TYPE_LINUX_BLOCK’ not handled in switch warning: enumeration value ‘REQ_TYPE_ATA_TASKFILE’ not handled in switch warning: enumeration value ‘REQ_TYPE_ATA_PC’ not handled in switch which is a bit pointless since this is at the end of the request processessing. Add a default case that just breaks out. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/virtio_blk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 774144334ece..b5ebcd33bdb6 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -74,6 +74,8 @@ static void blk_done(struct virtqueue *vq)
74 case REQ_TYPE_SPECIAL: 74 case REQ_TYPE_SPECIAL:
75 vbr->req->errors = (error != 0); 75 vbr->req->errors = (error != 0);
76 break; 76 break;
77 default:
78 break;
77 } 79 }
78 80
79 __blk_end_request_all(vbr->req, error); 81 __blk_end_request_all(vbr->req, error);