diff options
Diffstat (limited to 'drivers/block/ps3vram.c')
-rw-r--r-- | drivers/block/ps3vram.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 456b4fe21559..e0e81cacd781 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c | |||
@@ -428,7 +428,7 @@ static void ps3vram_cache_cleanup(struct ps3_system_bus_device *dev) | |||
428 | kfree(priv->cache.tags); | 428 | kfree(priv->cache.tags); |
429 | } | 429 | } |
430 | 430 | ||
431 | static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from, | 431 | static blk_status_t ps3vram_read(struct ps3_system_bus_device *dev, loff_t from, |
432 | size_t len, size_t *retlen, u_char *buf) | 432 | size_t len, size_t *retlen, u_char *buf) |
433 | { | 433 | { |
434 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); | 434 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); |
@@ -438,7 +438,7 @@ static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from, | |||
438 | (unsigned int)from, len); | 438 | (unsigned int)from, len); |
439 | 439 | ||
440 | if (from >= priv->size) | 440 | if (from >= priv->size) |
441 | return -EIO; | 441 | return BLK_STS_IOERR; |
442 | 442 | ||
443 | if (len > priv->size - from) | 443 | if (len > priv->size - from) |
444 | len = priv->size - from; | 444 | len = priv->size - from; |
@@ -472,14 +472,14 @@ static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from, | |||
472 | return 0; | 472 | return 0; |
473 | } | 473 | } |
474 | 474 | ||
475 | static int ps3vram_write(struct ps3_system_bus_device *dev, loff_t to, | 475 | static blk_status_t ps3vram_write(struct ps3_system_bus_device *dev, loff_t to, |
476 | size_t len, size_t *retlen, const u_char *buf) | 476 | size_t len, size_t *retlen, const u_char *buf) |
477 | { | 477 | { |
478 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); | 478 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); |
479 | unsigned int cached, count; | 479 | unsigned int cached, count; |
480 | 480 | ||
481 | if (to >= priv->size) | 481 | if (to >= priv->size) |
482 | return -EIO; | 482 | return BLK_STS_IOERR; |
483 | 483 | ||
484 | if (len > priv->size - to) | 484 | if (len > priv->size - to) |
485 | len = priv->size - to; | 485 | len = priv->size - to; |
@@ -554,7 +554,7 @@ static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev, | |||
554 | int write = bio_data_dir(bio) == WRITE; | 554 | int write = bio_data_dir(bio) == WRITE; |
555 | const char *op = write ? "write" : "read"; | 555 | const char *op = write ? "write" : "read"; |
556 | loff_t offset = bio->bi_iter.bi_sector << 9; | 556 | loff_t offset = bio->bi_iter.bi_sector << 9; |
557 | int error = 0; | 557 | blk_status_t error = 0; |
558 | struct bio_vec bvec; | 558 | struct bio_vec bvec; |
559 | struct bvec_iter iter; | 559 | struct bvec_iter iter; |
560 | struct bio *next; | 560 | struct bio *next; |
@@ -578,7 +578,7 @@ static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev, | |||
578 | 578 | ||
579 | if (retlen != len) { | 579 | if (retlen != len) { |
580 | dev_err(&dev->core, "Short %s\n", op); | 580 | dev_err(&dev->core, "Short %s\n", op); |
581 | error = -EIO; | 581 | error = BLK_STS_IOERR; |
582 | goto out; | 582 | goto out; |
583 | } | 583 | } |
584 | 584 | ||
@@ -593,7 +593,7 @@ out: | |||
593 | next = bio_list_peek(&priv->list); | 593 | next = bio_list_peek(&priv->list); |
594 | spin_unlock_irq(&priv->lock); | 594 | spin_unlock_irq(&priv->lock); |
595 | 595 | ||
596 | bio->bi_error = error; | 596 | bio->bi_status = error; |
597 | bio_endio(bio); | 597 | bio_endio(bio); |
598 | return next; | 598 | return next; |
599 | } | 599 | } |
@@ -606,7 +606,7 @@ static blk_qc_t ps3vram_make_request(struct request_queue *q, struct bio *bio) | |||
606 | 606 | ||
607 | dev_dbg(&dev->core, "%s\n", __func__); | 607 | dev_dbg(&dev->core, "%s\n", __func__); |
608 | 608 | ||
609 | blk_queue_split(q, &bio, q->bio_split); | 609 | blk_queue_split(q, &bio); |
610 | 610 | ||
611 | spin_lock_irq(&priv->lock); | 611 | spin_lock_irq(&priv->lock); |
612 | busy = !bio_list_empty(&priv->list); | 612 | busy = !bio_list_empty(&priv->list); |