summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLukas Bulwahn <lukas.bulwahn@gmail.com>2020-12-12 06:13:02 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-12 11:18:56 -0700
commitaeb2b0b1a3da5791d3b216e71ec72db7570f3571 (patch)
treef7de46d8e8b7a177ab492648e275ca3fc06c8f6a /drivers
parent31cc07761ccb389c7c01f904f6a6479544abbd11 (diff)
block: drop dead assignments in loop_init()
Commit 8410d38c2552 ("loop: use __register_blkdev to allocate devices on demand") simplified loop_init(); so computing the range of the block region is not required anymore and can be dropped. Drop dead assignments in loop_init(). As compilers will detect these unneeded assignments and optimize this, the resulting object code is identical before and after this change. No functional change. No change in object code. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/loop.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 22e59410b971..a45248c6e319 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -2316,7 +2316,6 @@ MODULE_ALIAS("devname:loop-control");
static int __init loop_init(void)
{
int i, nr;
- unsigned long range;
struct loop_device *lo;
int err;
@@ -2353,13 +2352,10 @@ static int __init loop_init(void)
* /dev/loop-control interface, or be instantiated by accessing
* a 'dead' device node.
*/
- if (max_loop) {
+ if (max_loop)
nr = max_loop;
- range = max_loop << part_shift;
- } else {
+ else
nr = CONFIG_BLK_DEV_LOOP_MIN_COUNT;
- range = 1UL << MINORBITS;
- }
err = misc_register(&loop_misc);
if (err < 0)