]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/block/ps3vram.c
block: switch bios to blk_status_t
[mirror_ubuntu-bionic-kernel.git] / drivers / block / ps3vram.c
index 456b4fe21559877c825b4e3da05b3c0de841a7e4..6fa2b8197013f9c8dfe8442f6c2ccd8d0d28d80b 100644 (file)
@@ -428,7 +428,7 @@ static void ps3vram_cache_cleanup(struct ps3_system_bus_device *dev)
        kfree(priv->cache.tags);
 }
 
-static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from,
+static blk_status_t ps3vram_read(struct ps3_system_bus_device *dev, loff_t from,
                        size_t len, size_t *retlen, u_char *buf)
 {
        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,
                (unsigned int)from, len);
 
        if (from >= priv->size)
-               return -EIO;
+               return BLK_STS_IOERR;
 
        if (len > priv->size - from)
                len = priv->size - from;
@@ -472,14 +472,14 @@ static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from,
        return 0;
 }
 
-static int ps3vram_write(struct ps3_system_bus_device *dev, loff_t to,
+static blk_status_t ps3vram_write(struct ps3_system_bus_device *dev, loff_t to,
                         size_t len, size_t *retlen, const u_char *buf)
 {
        struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev);
        unsigned int cached, count;
 
        if (to >= priv->size)
-               return -EIO;
+               return BLK_STS_IOERR;
 
        if (len > priv->size - to)
                len = priv->size - to;
@@ -554,7 +554,7 @@ static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev,
        int write = bio_data_dir(bio) == WRITE;
        const char *op = write ? "write" : "read";
        loff_t offset = bio->bi_iter.bi_sector << 9;
-       int error = 0;
+       blk_status_t error = 0;
        struct bio_vec bvec;
        struct bvec_iter iter;
        struct bio *next;
@@ -578,7 +578,7 @@ static struct bio *ps3vram_do_bio(struct ps3_system_bus_device *dev,
 
                if (retlen != len) {
                        dev_err(&dev->core, "Short %s\n", op);
-                       error = -EIO;
+                       error = BLK_STS_IOERR;
                        goto out;
                }
 
@@ -593,7 +593,7 @@ out:
        next = bio_list_peek(&priv->list);
        spin_unlock_irq(&priv->lock);
 
-       bio->bi_error = error;
+       bio->bi_status = error;
        bio_endio(bio);
        return next;
 }