xen-blkfront: Fix handling of non-supported operations
authorBart Van Assche <[email protected]>
Fri, 21 Jul 2017 17:11:10 +0000 (19:11 +0200)
committerJens Axboe <[email protected]>
Mon, 24 Jul 2017 14:45:48 +0000 (08:45 -0600)
commit31c4ccc3ecb4944f6936082fabb5a86e3d086191
treeaf01524dcc23bc647fac7424d684eb086b4237c6
parenta7ee8cf190ecc8f118f0b7839912564117524d85
xen-blkfront: Fix handling of non-supported operations

This patch fixes the following sparse warnings:

drivers/block/xen-blkfront.c:916:45: warning: incorrect type in argument 2 (different base types)
drivers/block/xen-blkfront.c:916:45:    expected restricted blk_status_t [usertype] error
drivers/block/xen-blkfront.c:916:45:    got int [signed] error
drivers/block/xen-blkfront.c:1599:47: warning: incorrect type in assignment (different base types)
drivers/block/xen-blkfront.c:1599:47:    expected int [signed] error
drivers/block/xen-blkfront.c:1599:47:    got restricted blk_status_t [usertype] <noident>
drivers/block/xen-blkfront.c:1607:55: warning: incorrect type in assignment (different base types)
drivers/block/xen-blkfront.c:1607:55:    expected int [signed] error
drivers/block/xen-blkfront.c:1607:55:    got restricted blk_status_t [usertype] <noident>
drivers/block/xen-blkfront.c:1625:55: warning: incorrect type in assignment (different base types)
drivers/block/xen-blkfront.c:1625:55:    expected int [signed] error
drivers/block/xen-blkfront.c:1625:55:    got restricted blk_status_t [usertype] <noident>
drivers/block/xen-blkfront.c:1628:62: warning: restricted blk_status_t degrades to integer

Compile-tested only.

Fixes: commit 2a842acab109 ("block: introduce new block status code type")
Signed-off-by: Bart Van Assche <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Roger Pau MonnĂ© <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/block/xen-blkfront.c