Skip to content

Commit

Permalink
blk-mq: remove blk_qc_t_valid
Browse files Browse the repository at this point in the history
Move the trivial check into the only caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Tested-by: Mark Wunderlich <mark.wunderlich@intel.com>
Link: https://lore.kernel.org/r/20211012111226.760968-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Oct 18, 2021
1 parent efbabbe commit 28a1ae6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -4098,7 +4098,7 @@ static int blk_mq_poll_classic(struct request_queue *q, blk_qc_t cookie,
*/
int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
{
if (!blk_qc_t_valid(cookie) ||
if (cookie == BLK_QC_T_NONE ||
!test_bit(QUEUE_FLAG_POLL, &q->queue_flags))
return 0;

Expand Down
5 changes: 0 additions & 5 deletions include/linux/blk_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,6 @@ typedef unsigned int blk_qc_t;
#define BLK_QC_T_SHIFT 16
#define BLK_QC_T_INTERNAL (1U << 31)

static inline bool blk_qc_t_valid(blk_qc_t cookie)
{
return cookie != BLK_QC_T_NONE;
}

struct blk_rq_stat {
u64 mean;
u64 min;
Expand Down

0 comments on commit 28a1ae6

Please sign in to comment.