[PATCH] loop: remove the unused bdev variable in loop_set_status

DORMANTno replies

From: Christoph Hellwig <hch@lst.de>
Date: 2021-06-25 06:40:46
Subsystem: block layer, the rest · Maintainers: Jens Axboe, Linus Torvalds

Some compilers (rightly) complain that bdev is assigned to, but not used
now.

Fixes: 0384264ea8a3 ("block: pass a gendisk to bdev_disk_changed")
Reported-by: kernel test robot <redacted>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/loop.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index c6e73c051790..f96f047deeba 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1341,7 +1341,6 @@ static int
 loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
 {
 	int err;
-	struct block_device *bdev;
 	kuid_t uid = current_uid();
 	int prev_lo_flags;
 	bool partscan = false;
@@ -1410,7 +1409,6 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
 	if (!err && (lo->lo_flags & LO_FLAGS_PARTSCAN) &&
 	     !(prev_lo_flags & LO_FLAGS_PARTSCAN)) {
 		lo->lo_disk->flags &= ~GENHD_FL_NO_PART_SCAN;
-		bdev = lo->lo_device;
 		partscan = true;
 	}
 out_unlock:
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help