aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-05 21:52:57 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-07 02:16:21 -0400
commitdb2a144bedd58b3dcf19950c2f476c58c9f39d18 (patch)
tree931f1b5a8e6bafe388b317bce02a9fd9af309d38 /drivers/s390
parenta8ca889ed9585894d53fd8919d80cbe8baff09e7 (diff)
block_device_operations->release() should return void
The value passed is 0 in all but "it can never happen" cases (and those only in a couple of drivers) *and* it would've been lost on the way out anyway, even if something tried to pass something meaningful. Just don't bother. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd.c18
-rw-r--r--drivers/s390/block/dcssblk.c12
-rw-r--r--drivers/s390/block/scm_blk.c3
3 files changed, 12 insertions, 21 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 82758cbb220b..4361d9772c42 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2997,18 +2997,14 @@ unlock:
2997 return rc; 2997 return rc;
2998} 2998}
2999 2999
3000static int dasd_release(struct gendisk *disk, fmode_t mode) 3000static void dasd_release(struct gendisk *disk, fmode_t mode)
3001{ 3001{
3002 struct dasd_device *base; 3002 struct dasd_device *base = dasd_device_from_gendisk(disk);
3003 3003 if (base) {
3004 base = dasd_device_from_gendisk(disk); 3004 atomic_dec(&base->block->open_count);
3005 if (!base) 3005 module_put(base->discipline->owner);
3006 return -ENODEV; 3006 dasd_put_device(base);
3007 3007 }
3008 atomic_dec(&base->block->open_count);
3009 module_put(base->discipline->owner);
3010 dasd_put_device(base);
3011 return 0;
3012} 3008}
3013 3009
3014/* 3010/*
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index b6ad0de07930..07ba32b07fb0 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -26,7 +26,7 @@
26#define DCSS_BUS_ID_SIZE 20 26#define DCSS_BUS_ID_SIZE 20
27 27
28static int dcssblk_open(struct block_device *bdev, fmode_t mode); 28static int dcssblk_open(struct block_device *bdev, fmode_t mode);
29static int dcssblk_release(struct gendisk *disk, fmode_t mode); 29static void dcssblk_release(struct gendisk *disk, fmode_t mode);
30static void dcssblk_make_request(struct request_queue *q, struct bio *bio); 30static void dcssblk_make_request(struct request_queue *q, struct bio *bio);
31static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum, 31static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum,
32 void **kaddr, unsigned long *pfn); 32 void **kaddr, unsigned long *pfn);
@@ -781,16 +781,15 @@ out:
781 return rc; 781 return rc;
782} 782}
783 783
784static int 784static void
785dcssblk_release(struct gendisk *disk, fmode_t mode) 785dcssblk_release(struct gendisk *disk, fmode_t mode)
786{ 786{
787 struct dcssblk_dev_info *dev_info = disk->private_data; 787 struct dcssblk_dev_info *dev_info = disk->private_data;
788 struct segment_info *entry; 788 struct segment_info *entry;
789 int rc;
790 789
791 if (!dev_info) { 790 if (!dev_info) {
792 rc = -ENODEV; 791 WARN_ON(1);
793 goto out; 792 return;
794 } 793 }
795 down_write(&dcssblk_devices_sem); 794 down_write(&dcssblk_devices_sem);
796 if (atomic_dec_and_test(&dev_info->use_count) 795 if (atomic_dec_and_test(&dev_info->use_count)
@@ -803,9 +802,6 @@ dcssblk_release(struct gendisk *disk, fmode_t mode)
803 dev_info->save_pending = 0; 802 dev_info->save_pending = 0;
804 } 803 }
805 up_write(&dcssblk_devices_sem); 804 up_write(&dcssblk_devices_sem);
806 rc = 0;
807out:
808 return rc;
809} 805}
810 806
811static void 807static void
diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c
index b303cab76a7f..5d73e6e49af6 100644
--- a/drivers/s390/block/scm_blk.c
+++ b/drivers/s390/block/scm_blk.c
@@ -123,10 +123,9 @@ static int scm_open(struct block_device *blkdev, fmode_t mode)
123 return scm_get_ref(); 123 return scm_get_ref();
124} 124}
125 125
126static int scm_release(struct gendisk *gendisk, fmode_t mode) 126static void scm_release(struct gendisk *gendisk, fmode_t mode)
127{ 127{
128 scm_put_ref(); 128 scm_put_ref();
129 return 0;
130} 129}
131 130
132static const struct block_device_operations scm_blk_devops = { 131static const struct block_device_operations scm_blk_devops = {