[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200721151313.GA10620@lst.de>
Date: Tue, 21 Jul 2020 17:13:13 +0200
From: Christoph Hellwig <hch@....de>
To: Maxim Levitsky <mlevitsk@...hat.com>
Cc: linux-kernel@...r.kernel.org, Keith Busch <kbusch@...nel.org>,
Josef Bacik <josef@...icpanda.com>,
"open list:BLOCK LAYER" <linux-block@...r.kernel.org>,
Sagi Grimberg <sagi@...mberg.me>, Jens Axboe <axboe@...nel.dk>,
"open list:NVM EXPRESS DRIVER" <linux-nvme@...ts.infradead.org>,
"open list:SCSI CDROM DRIVER" <linux-scsi@...r.kernel.org>,
Tejun Heo <tj@...nel.org>,
Bart Van Assche <bvanassche@....org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Damien Le Moal <damien.lemoal@....com>,
Jason Wang <jasowang@...hat.com>,
Maxim Levitsky <maximlevitsky@...il.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
Colin Ian King <colin.king@...onical.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Ajay Joshi <ajay.joshi@....com>,
Ming Lei <ming.lei@...hat.com>,
"open list:SONY MEMORYSTICK SUBSYSTEM" <linux-mmc@...r.kernel.org>,
Christoph Hellwig <hch@....de>,
Satya Tangirala <satyat@...gle.com>,
"open list:NETWORK BLOCK DEVICE (NBD)" <nbd@...er.debian.org>,
Hou Tao <houtao1@...wei.com>, Jens Axboe <axboe@...com>,
"open list:VIRTIO CORE AND NET DRIVERS"
<virtualization@...ts.linux-foundation.org>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Alex Dubov <oakad@...oo.com>
Subject: Re: [PATCH 01/10] block: introduce blk_is_valid_logical_block_size
> +/**
> + * blk_check_logical_block_size - check if logical block size is supported
> + * by the kernel
> + * @size: the logical block size, in bytes
> + *
> + * Description:
> + * This function checks if the block layers supports given block size
> + **/
> +bool blk_is_valid_logical_block_size(unsigned int size)
> +{
> + return size >= SECTOR_SIZE && size <= PAGE_SIZE && !is_power_of_2(size);
Shouldn't this be a ... && is_power_of_2(size)?
> if (q->limits.io_min < q->limits.physical_block_size)
> q->limits.io_min = q->limits.physical_block_size;
> +
> }
This adds a pointless empty line.
> +extern bool blk_is_valid_logical_block_size(unsigned int size);
No need for externs on function declarations.
Powered by blists - more mailing lists