From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lb0-f177.google.com ([209.85.217.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SQ03k-0003jb-AA for linux-mtd@lists.infradead.org; Thu, 03 May 2012 17:43:22 +0000 Received: by lbbgg6 with SMTP id gg6so1784732lbb.36 for ; Thu, 03 May 2012 10:43:17 -0700 (PDT) Date: Thu, 3 May 2012 20:43:07 +0300 From: Shmulik Ladkani To: Mike Dunn Subject: Re: [PATCH v4 01/10] mtd: nand: add 'oob_required' argument to NAND {read, write}_page interfaces Message-ID: <20120503204307.6d93115d@halley> In-Reply-To: <4FA2BD85.1050102@newsguy.com> References: <1335978904-8005-1-git-send-email-computersforpeace@gmail.com> <1335978904-8005-2-git-send-email-computersforpeace@gmail.com> <4FA2BD85.1050102@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Li Yang , Artem Bityutskiy , Lei Wen , Kevin Cernekee , Wolfram Sang , Matthieu CASTET , Huang Shijie , linux-mtd@lists.infradead.org, Bastian Hecht , Jiandong Zheng , Florian Fainelli , Scott Wood , Jamie Iles , Thomas Gleixner , Brian Norris , David Woodhouse , Axel Lin , Prabhakar Kushwaha List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Mike, On Thu, 03 May 2012 10:16:53 -0700 Mike Dunn wrote: > I wonder why the new argument type is int instead of bool. Sorry if this was > already discussed... I didn't follow the earlier discussions very closely. Well, Brian's initial post correctly had a 'bool' parameter in the suggested interface. I pointed out that within MTD code, 'int' is very widely used to indicate boolean types, so I suggested changing to 'int' for consistency with all other MTD interfaces. > Still, it seems inconsistent. When calling the functions, you sometimes pass > the bool form... > > > - status = docg4_read_page(mtd, nand, buf, DOCG4_FACTORY_BBT_PAGE); > > + status = docg4_read_page(mtd, nand, buf, false, DOCG4_FACTORY_BBT_PAGE); > > and sometimes the int form... > > > - chip->ecc.read_page_raw(mtd, chip, buf, page); > > + chip->ecc.read_page_raw(mtd, chip, buf, 1, page); I guess the 'true/false' arguments are leftovers from Brian's previous posts... I noted these while reviewing, and personally don't mind them, but I guess '0/1' are more appropriate. Regards, Shmulik