Skip to content

Commit

Permalink
block: Inline blk_queue_nr_zones()
Browse files Browse the repository at this point in the history
Since the implementation of blk_queue_nr_zones() is trivial and since
it only has a single caller, inline this function.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Matias Bjorling <mb@lightnvm.io>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Bart Van Assche authored and Jens Axboe committed Jul 9, 2018
1 parent 6b1d83d commit 7c8542b
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-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static int queue_zone_wlock_show(void *data, struct seq_file *m)
if (!q->seq_zones_wlock)
return 0;

for (i = 0; i < blk_queue_nr_zones(q); i++)
for (i = 0; i < q->nr_zones; i++)
if (test_bit(i, q->seq_zones_wlock))
seq_printf(m, "%u\n", i);

Expand Down
5 changes: 0 additions & 5 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -800,11 +800,6 @@ static inline unsigned int blk_queue_zone_sectors(struct request_queue *q)
return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0;
}

static inline unsigned int blk_queue_nr_zones(struct request_queue *q)
{
return q->nr_zones;
}

static inline unsigned int blk_queue_zone_no(struct request_queue *q,
sector_t sector)
{
Expand Down

0 comments on commit 7c8542b

Please sign in to comment.