[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <858a5977-e54a-dfa2-c627-56db113128f0@samsung.com>
Date: Thu, 28 Apr 2022 17:40:52 +0200
From: Pankaj Raghav <p.raghav@...sung.com>
To: Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
<jaegeuk@...nel.org>, <axboe@...nel.dk>, <snitzer@...nel.org>,
<hch@....de>, <mcgrof@...nel.org>, <naohiro.aota@....com>,
<sagi@...mberg.me>, <dsterba@...e.com>,
<johannes.thumshirn@....com>
CC: <linux-kernel@...r.kernel.org>, <clm@...com>,
<gost.dev@...sung.com>, <chao@...nel.org>, <josef@...icpanda.com>,
<jonathan.derrick@...ux.dev>, <agk@...hat.com>,
<kbusch@...nel.org>, <kch@...dia.com>,
<linux-nvme@...ts.infradead.org>, <bvanassche@....org>,
<jiangbo.365@...edance.com>, <matias.bjorling@....com>,
<linux-block@...r.kernel.org>
Subject: Re: [PATCH 03/16] block: add bdev_zone_no helper
On 2022-04-28 01:31, Damien Le Moal wrote:
>> +static inline unsigned int bdev_zone_no(struct block_device *bdev, sector_t sec)
>> +{
>> + struct request_queue *q = bdev_get_queue(bdev);
>> +
>> + if (q)
>
> q is never NULL. So this can be simplified to:
>
That is a good point. I just noticed it in the bdev_get_queue() function
that q can never be NULL. I will fix it up.
All the functions `bdev*` have this pattern, so probably they could be
simplified as well in the future.
> return blk_queue_zone_no(bdev_get_queue(bdev), sector);
>
>> + return blk_queue_zone_no(q, sec);
>> + return 0;
>> +}
>> +
>> static inline unsigned int bdev_max_open_zones(struct block_device *bdev)
>> {
>> struct request_queue *q = bdev_get_queue(bdev);
>
>
Powered by blists - more mailing lists