Commit aeb2b0b1 authored by Lukas Bulwahn's avatar Lukas Bulwahn Committed by Jens Axboe
Browse files

block: drop dead assignments in loop_init()



Commit 8410d38c ("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: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 31cc0776
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -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)