Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754323AbbKLKBS (ORCPT ); Thu, 12 Nov 2015 05:01:18 -0500 Received: from mail-lb0-f169.google.com ([209.85.217.169]:32788 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754306AbbKLKBN (ORCPT ); Thu, 12 Nov 2015 05:01:13 -0500 Message-ID: <56446366.8050907@bjorling.me> Date: Thu, 12 Nov 2015 11:01:10 +0100 From: =?UTF-8?B?TWF0aWFzIEJqw7hybGluZw==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Geert Uytterhoeven 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 Subject: Re: [PATCH v14 1/5] lightnvm: Support for Open-Channel SSDs References: <1446058499-24150-1-git-send-email-m@bjorling.me> <1446058499-24150-2-git-send-email-m@bjorling.me> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1240 Lines: 40 On 11/11/2015 11:46 PM, Geert Uytterhoeven wrote: > On Wed, Oct 28, 2015 at 7:54 PM, Matias Bjørling 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_dev_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 256 is just an upper sensible bound. I'll create a patch to make it an unsigned short. Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/