public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@wdc.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bart.vanassche@wdc.com>,
	Hannes Reinecke <hare@suse.de>,
	Johannes Thumshirn <jthumshirn@suse.de>,
	Ming Lei <ming.lei@redhat.com>
Subject: [PATCH 05/11] mtip32xx: Use the blk_queue_flag_*() functions
Date: Wed, 28 Feb 2018 11:28:17 -0800	[thread overview]
Message-ID: <20180228192823.5191-6-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20180228192823.5191-1-bart.vanassche@wdc.com>

Use the blk_queue_flag_*() functions instead of open-coding these.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
---
 drivers/block/mtip32xx/mtip32xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index b8af7352a18f..769c551e3d71 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -159,7 +159,7 @@ static bool mtip_check_surprise_removal(struct pci_dev *pdev)
 	if (vendor_id == 0xFFFF) {
 		dd->sr = true;
 		if (dd->queue)
-			set_bit(QUEUE_FLAG_DEAD, &dd->queue->queue_flags);
+			blk_queue_flag_set(QUEUE_FLAG_DEAD, dd->queue);
 		else
 			dev_warn(&dd->pdev->dev,
 				"%s: dd->queue is NULL\n", __func__);
@@ -3855,8 +3855,8 @@ static int mtip_block_initialize(struct driver_data *dd)
 		goto start_service_thread;
 
 	/* Set device limits. */
-	set_bit(QUEUE_FLAG_NONROT, &dd->queue->queue_flags);
-	clear_bit(QUEUE_FLAG_ADD_RANDOM, &dd->queue->queue_flags);
+	blk_queue_flag_set(QUEUE_FLAG_NONROT, dd->queue);
+	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, dd->queue);
 	blk_queue_max_segments(dd->queue, MTIP_MAX_SG);
 	blk_queue_physical_block_size(dd->queue, 4096);
 	blk_queue_max_hw_sectors(dd->queue, 0xffff);
@@ -3866,7 +3866,7 @@ static int mtip_block_initialize(struct driver_data *dd)
 
 	/* Signal trim support */
 	if (dd->trim_supp == true) {
-		set_bit(QUEUE_FLAG_DISCARD, &dd->queue->queue_flags);
+		blk_queue_flag_set(QUEUE_FLAG_DISCARD, dd->queue);
 		dd->queue->limits.discard_granularity = 4096;
 		blk_queue_max_discard_sectors(dd->queue,
 			MTIP_MAX_TRIM_ENTRY_LEN * MTIP_MAX_TRIM_ENTRIES);
-- 
2.16.2

  parent reply	other threads:[~2018-02-28 19:28 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 19:28 [PATCH 00/11] Make all concurrent queue flag manipulations safe Bart Van Assche
2018-02-28 19:28 ` [PATCH 01/11] block: Reorder the queue flag manipulaton function definitions Bart Van Assche
2018-03-01  8:42   ` Johannes Thumshirn
2018-03-02 23:09   ` Martin K. Petersen
2018-03-08  1:02     ` Bart Van Assche
2018-02-28 19:28 ` [PATCH 02/11] block: Use the queue_flag_*() functions instead of open-coding these Bart Van Assche
2018-03-01  8:43   ` Johannes Thumshirn
2018-03-02 23:09   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 03/11] block: Introduce blk_queue_flag_{set,clear,test_and_{set,clear}}() Bart Van Assche
2018-03-01  8:46   ` Johannes Thumshirn
2018-03-02 23:11   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 04/11] block: Protect queue flag changes with the queue lock Bart Van Assche
2018-03-01  8:51   ` Johannes Thumshirn
2018-03-01 15:19     ` Bart Van Assche
2018-03-01 15:22       ` Johannes Thumshirn
2018-03-02 23:12   ` Martin K. Petersen
2018-02-28 19:28 ` Bart Van Assche [this message]
2018-03-01  8:52   ` [PATCH 05/11] mtip32xx: Use the blk_queue_flag_*() functions Johannes Thumshirn
2018-03-02 23:12   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 06/11] bcache: Use the blk_queue_flag_{set,clear}() functions Bart Van Assche
2018-02-28 20:18   ` Michael Lyle
2018-03-01  8:52   ` Johannes Thumshirn
2018-03-02 23:12   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 07/11] iscsi: Use blk_queue_flag_set() Bart Van Assche
2018-03-01  8:53   ` Johannes Thumshirn
2018-03-02 23:14   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 08/11] target/tcm_loop: " Bart Van Assche
2018-03-01  8:53   ` Johannes Thumshirn
2018-03-02 23:17   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 09/11] block: Use blk_queue_flag_*() in drivers instead of queue_flag_*() Bart Van Assche
2018-03-02 23:17   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 10/11] block: Complain if queue_flag_(set|clear)_unlocked() is abused Bart Van Assche
2018-03-01  8:57   ` Johannes Thumshirn
2018-03-02 23:18   ` Martin K. Petersen
2018-02-28 19:28 ` [PATCH 11/11] block: Move the queue_flag_*() functions from a public into a private header file Bart Van Assche
2018-03-01  8:57   ` Johannes Thumshirn
2018-03-02 23:20   ` Martin K. Petersen

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=20180228192823.5191-6-bart.vanassche@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jthumshirn@suse.de \
    --cc=linux-block@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