Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753056AbbKKWrm (ORCPT ); Wed, 11 Nov 2015 17:47:42 -0500 Received: from mail-oi0-f46.google.com ([209.85.218.46]:36523 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752805AbbKKWrk convert rfc822-to-8bit (ORCPT ); Wed, 11 Nov 2015 17:47:40 -0500 MIME-Version: 1.0 In-Reply-To: References: <1446058499-24150-1-git-send-email-m@bjorling.me> <1446058499-24150-2-git-send-email-m@bjorling.me> Date: Wed, 11 Nov 2015 23:47:39 +0100 X-Google-Sender-Auth: oJtbiDohWLhd8jtiAh0_WGSxmUg Message-ID: Subject: Re: [PATCH v14 1/5] lightnvm: Support for Open-Channel SSDs From: Geert Uytterhoeven To: =?UTF-8?Q?Matias_Bj=C3=B8rling?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1666 Lines: 53 On Wed, Nov 11, 2015 at 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 Oops, I copied the wrong warning. Obviously this was supposed to be "drivers/lightnvm/core.c:322: 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? > >> + return -EINVAL; >> + } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- 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/