linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/2] block: remove a pointless call to MINOR() in device_add_disk
Date: Tue, 24 Aug 2021 09:52:15 +0200	[thread overview]
Message-ID: <20210824075216.1179406-2-hch@lst.de> (raw)
In-Reply-To: <20210824075216.1179406-1-hch@lst.de>

blk_alloc_ext_minor already returns just a minor number, so no need to
mask the high bits.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/genhd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/genhd.c b/block/genhd.c
index a4817e42f3a3..3ee031c97f22 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -515,7 +515,7 @@ static void __device_add_disk(struct device *parent, struct gendisk *disk,
 			return;
 		}
 		disk->major = BLOCK_EXT_MAJOR;
-		disk->first_minor = MINOR(ret);
+		disk->first_minor = ret;
 		disk->flags |= GENHD_FL_EXT_DEVT;
 	}
 
-- 
2.30.2


  reply	other threads:[~2021-08-24  7:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24  7:52 extended dev_t tidyups Christoph Hellwig
2021-08-24  7:52 ` Christoph Hellwig [this message]
2021-08-24  7:52 ` [PATCH 2/2] block: remove CONFIG_DEBUG_BLOCK_EXT_DEVT Christoph Hellwig
2021-08-24 12:43 ` extended dev_t tidyups Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210824075216.1179406-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).