From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?TWF0aWFzIEJqw7hybGluZw==?= Subject: Re: [PATCH v14 1/5] lightnvm: Support for Open-Channel SSDs Date: Thu, 12 Nov 2015 11:01:10 +0100 Message-ID: <56446366.8050907@bjorling.me> References: <1446058499-24150-1-git-send-email-m@bjorling.me> <1446058499-24150-2-git-send-email-m@bjorling.me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Jens Axboe , Linux FS Devel , "linux-kernel@vger.kernel.org" , linux-nvme@lists.infradead.org, Christoph Hellwig , jg@lightnvm.io, Stephen.Bates@pmcs.com, Keith Busch To: Geert Uytterhoeven Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 11/11/2015 11:46 PM, Geert Uytterhoeven wrote: > On Wed, Oct 28, 2015 at 7:54 PM, Matias Bj=C3=B8rling = wrote: >> +struct nvm_dev_ops { > > [...] > >> + uint8_t max_phys_sect; >> +}; > >> --- /dev/null >> +++ b/drivers/lightnvm/core.c > >> +int nvm_register(struct request_queue *q, char *disk_name, >> + struct nvm_d= ev_ops *ops) >> +{ > > [...] > >> + } else if (dev->ops->max_phys_sect > 256) { > > drivers/nfc/nfcmrvl/i2c.c:52: warning: comparison is always false due > to limited range of data type > > Indeed, max_phys_sect is "uint8_t", so its maximum value is 255. > >> + pr_info("nvm: max sectors supported is 256.\n"); > > Hence this message is not correct. What's the intended maximum value? > 255 or 256? Good catch. It'll be 256, the typically device driver supports 64. The=20 256 is just an upper sensible bound. I'll create a patch to make it an=20 unsigned short. Thanks