Skip to content

Commit

Permalink
s390/scm_blk: consistently use blk_status_t as error type
Browse files Browse the repository at this point in the history
Fix these warnings found by sparse:
drivers/s390/block/scm_blk.c:257:24: warning: incorrect type in assignment (different base types)
drivers/s390/block/scm_blk.c:257:24:    expected int [signed] <noident>
drivers/s390/block/scm_blk.c:257:24:    got restricted blk_status_t [usertype] error
drivers/s390/block/scm_blk.c:420:33: warning: incorrect type in argument 2 (different base types)
drivers/s390/block/scm_blk.c:420:33:    expected restricted blk_status_t [usertype] error
drivers/s390/block/scm_blk.c:420:33:    got int [signed] <noident>

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Sep 19, 2017
1 parent 673514a commit c8b8502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/s390/block/scm_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static void scm_request_requeue(struct scm_request *scmrq)
static void scm_request_finish(struct scm_request *scmrq)
{
struct scm_blk_dev *bdev = scmrq->bdev;
int *error;
blk_status_t *error;
int i;

for (i = 0; i < nr_requests_per_io && scmrq->request[i]; i++) {
Expand Down Expand Up @@ -415,7 +415,7 @@ void scm_blk_irq(struct scm_device *scmdev, void *data, blk_status_t error)

static void scm_blk_request_done(struct request *req)
{
int *error = blk_mq_rq_to_pdu(req);
blk_status_t *error = blk_mq_rq_to_pdu(req);

blk_mq_end_request(req, *error);
}
Expand Down Expand Up @@ -450,7 +450,7 @@ int scm_blk_dev_setup(struct scm_blk_dev *bdev, struct scm_device *scmdev)
atomic_set(&bdev->queued_reqs, 0);

bdev->tag_set.ops = &scm_mq_ops;
bdev->tag_set.cmd_size = sizeof(int);
bdev->tag_set.cmd_size = sizeof(blk_status_t);
bdev->tag_set.nr_hw_queues = nr_requests;
bdev->tag_set.queue_depth = nr_requests_per_io * nr_requests;
bdev->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
Expand Down

0 comments on commit c8b8502

Please sign in to comment.