From 15fa6e81650a167f82dc0d478f290f1cffa9183d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 18 Jun 2010 12:10:18 +0200 Subject: virtio_blk: add default case to cmd type switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/block/virtio_blk.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/block/virtio_blk.c') diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 774144334ec..b5ebcd33bdb 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -74,6 +74,8 @@ static void blk_done(struct virtqueue *vq) case REQ_TYPE_SPECIAL: vbr->req->errors = (error != 0); break; + default: + break; } __blk_end_request_all(vbr->req, error); -- cgit v1.2.3-70-g09d2