From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from top.free-electrons.com ([176.31.233.9] helo=mail.free-electrons.com) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WFrFB-0006Ju-Ib for linux-mtd@lists.infradead.org; Tue, 18 Feb 2014 20:26:18 +0000 Date: Tue, 18 Feb 2014 17:25:53 -0300 From: Ezequiel Garcia To: Boris BREZILLON Subject: Re: [PATCH v2 1/2] of_mtd: Add helpers to get ECC strength and ECC step size Message-ID: <20140218202552.GB13799@localhost> References: <1392749474-12936-1-git-send-email-ezequiel.garcia@free-electrons.com> <1392749474-12936-2-git-send-email-ezequiel.garcia@free-electrons.com> <5303BC07.2090300@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5303BC07.2090300@gmail.com> Cc: Grant Likely , Brian Norris , linux-mtd@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Feb 18, 2014 at 09:01:11PM +0100, Boris BREZILLON wrote: > Le 18/02/2014 19:51, Ezequiel Garcia a écrit : > > This commit adds simple helpers to obtain the devicetree properties > > that specify the ECC strength and ECC step size to use on a given > > NAND controller. > > As already discussed with you, IMHO these 2 properties should both > be available to be meaningful, hence, we should provide an helper > function that gets both properties or return an error if one of them > is missing. > I think this way is both cleaner and simpler. I don't see the advantage of having a single function. > Do you plan to provide a default value (within controller drivers) if one > of these properties is missing ? In this case seperating the helper > functions make sense. > Being a general framework, we can't know what drivers will want to do, which is why I usually like helper function to say as simple as policy-free as possible. -- Ezequiel García, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com