[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <155668af6420a6516ded0e9101e0a47401a928d9.camel@redhat.com>
Date: Tue, 21 Jul 2020 15:55:37 +0300
From: Maxim Levitsky <mlevitsk@...hat.com>
To: Damien Le Moal <Damien.LeMoal@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: 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>,
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 09/10] block: scsi: sd: use
blk_is_valid_logical_block_size
On Tue, 2020-07-21 at 11:25 +0000, Damien Le Moal wrote:
> On 2020/07/21 19:55, Maxim Levitsky wrote:
> > Use blk_is_valid_logical_block_size instead of hardcoded list
>
> s/hardcoded list/hardcoded checks./
Done, thanks!
Best regards,
Maxim Levitsky
>
> > Signed-off-by: Maxim Levitsky <mlevitsk@...hat.com>
> > ---
> > drivers/scsi/sd.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> > index d90fefffe31b7..f012e7397b058 100644
> > --- a/drivers/scsi/sd.c
> > +++ b/drivers/scsi/sd.c
> > @@ -2520,10 +2520,7 @@ sd_read_capacity(struct scsi_disk *sdkp,
> > unsigned char *buffer)
> > "assuming 512.\n");
> > }
> >
> > - if (sector_size != 512 &&
> > - sector_size != 1024 &&
> > - sector_size != 2048 &&
> > - sector_size != 4096) {
> > + if (!blk_is_valid_logical_block_size(sector_size)) {
> > sd_printk(KERN_NOTICE, sdkp, "Unsupported sector size
> > %d.\n",
> > sector_size);
> > /*
> >
>
> With the commit message fixed, looks OK.
>
> Reviewed-by: Damien Le Moal <damien.lemoal@....com>
>
Powered by blists - more mailing lists