public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
To: axboe@kernel.dk, ming.lei@redhat.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	joseph.qi@linux.alibaba.com,
	Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
Subject: [PATCH RESEND 3/3] ublk: pass NULL to blk_mq_alloc_disk() as queuedata
Date: Tue,  7 Feb 2023 15:08:39 +0800	[thread overview]
Message-ID: <20230207070839.370817-4-ZiyangZhang@linux.alibaba.com> (raw)
In-Reply-To: <20230207070839.370817-1-ZiyangZhang@linux.alibaba.com>

queuedata is not referenced in ublk_drv and we can use driver_data
instead. Pass NULL to blk_mq_alloc_disk() as queuedata while allocating
ublk's gendisk.

Signed-off-by: Ziyang Zhang <ZiyangZhang@linux.alibaba.com>
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 06eddefdf02a..d83fe2c2b3ba 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -1578,7 +1578,7 @@ static int ublk_ctrl_start_dev(struct ublk_device *ub, struct io_uring_cmd *cmd)
 		goto out_unlock;
 	}
 
-	disk = blk_mq_alloc_disk(&ub->tag_set, ub);
+	disk = blk_mq_alloc_disk(&ub->tag_set, NULL);
 	if (IS_ERR(disk)) {
 		ret = PTR_ERR(disk);
 		goto out_unlock;
-- 
2.18.4


  parent reply	other threads:[~2023-02-07  7:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07  7:08 [PATCH RESEND 0/3] cleanup for ublk Ziyang Zhang
2023-02-07  7:08 ` [PATCH RESEND 1/3] ublk: remove unnecessary NULL check in ublk_rq_has_data() Ziyang Zhang
2023-02-07 14:06   ` Ming Lei
2023-02-07  7:08 ` [PATCH RESEND 2/3] ublk: mention WRITE_ZEROES in comment of ublk_complete_rq() Ziyang Zhang
2023-02-07 14:07   ` Ming Lei
2023-02-07  7:08 ` Ziyang Zhang [this message]
2023-02-07 14:08   ` [PATCH RESEND 3/3] ublk: pass NULL to blk_mq_alloc_disk() as queuedata Ming Lei
2023-02-07 14:21 ` [PATCH RESEND 0/3] cleanup for ublk 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=20230207070839.370817-4-ZiyangZhang@linux.alibaba.com \
    --to=ziyangzhang@linux.alibaba.com \
    --cc=axboe@kernel.dk \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    /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