loop: remove the unused bdev variable in loop_set_status

Started by Christoph Hellwig on Jun 25, 2021

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
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 / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help