[PATCH v2 1/2] of_mtd: Add helpers to get ECC strength and ECC step size
Boris BREZILLON
b.brezillon.dev at gmail.com
Mon Feb 24 10:44:48 EST 2014
On 18/02/2014 21:25, Ezequiel Garcia wrote:
> 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.
Okay, I'll ack this version and do the check in my driver then.
Thanks.
Best Regards,
Boris
>
>> 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.
More information about the linux-mtd
mailing list