mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: linux-kernel@vger.kernel.org
Cc: snitzer@redhat.com, mpatocka@redhat.com, axboe@fb.com,
	j-nomura@ce.jp.nec.com, neilb@suse.com,
	Bob Liu <bob.liu@oracle.com>
Subject: [PATCH] dm: drop unnecessary assignment of md->queue
Date: Wed, 24 Feb 2016 16:15:38 +0800	[thread overview]
Message-ID: <1456301738-16076-1-git-send-email-bob.liu@oracle.com> (raw)

md->queue and q are the same thing in dm_init_request_based_queue() and
dm_init_request_based_blk_mq_queue().

Also drop the temporary struct request_queue *q.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
 drivers/md/dm.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 5df4048..4f1f317 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2605,17 +2605,13 @@ static void init_rq_based_worker_thread(struct mapped_device *md)
  */
 static int dm_init_request_based_queue(struct mapped_device *md)
 {
-	struct request_queue *q = NULL;
-
 	/* Fully initialize the queue */
-	q = blk_init_allocated_queue(md->queue, dm_request_fn, NULL);
-	if (!q)
+	if (!blk_init_allocated_queue(md->queue, dm_request_fn, NULL))
 		return -EINVAL;
 
 	/* disable dm_request_fn's merge heuristic by default */
 	md->seq_rq_merge_deadline_usecs = 0;
 
-	md->queue = q;
 	dm_init_old_md_queue(md);
 	blk_queue_softirq_done(md->queue, dm_softirq_done);
 	blk_queue_prep_rq(md->queue, dm_prep_fn);
@@ -2740,7 +2736,6 @@ static int dm_init_request_based_blk_mq_queue(struct mapped_device *md)
 		err = PTR_ERR(q);
 		goto out_tag_set;
 	}
-	md->queue = q;
 	dm_init_md_queue(md);
 
 	/* backfill 'mq' sysfs registration normally done in blk_register_queue */
-- 
1.7.10.4

             reply	other threads:[~2016-02-24  8:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  8:15 Bob Liu [this message]
2016-02-24 16:58 ` Mike Snitzer

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=1456301738-16076-1-git-send-email-bob.liu@oracle.com \
    --to=bob.liu@oracle.com \
    --cc=axboe@fb.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=neilb@suse.com \
    --cc=snitzer@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

all inboxes | Powered by JetHome®