[PATCH v1] mtd: nandbiterrs: Have init function return 0 on success
Richard Weinberger
richard at nod.at
Mon Dec 19 02:33:17 PST 2016
On 19.12.2016 11:30, Marc Gonzalez wrote:
> On 13/12/2016 15:36, Marc Gonzalez wrote:
>
>> The init function currently returns -EIO on success. This behavior
>> was probably chosen in order to avoid a subsequent rmmod, but this
>> complicates failure detection from user-space.
>>
>> Signed-off-by: Marc Gonzalez <marc_gonzalez at sigmadesigns.com>
>> ---
>> I'm not sure failures are reported as expected. I would expect
>> the test to report a failure if the driver cannot fix less than
>> $STRENGTH bit flips, but it doesn't, AFAICT.
>> cf. incremental_errors_test which sets err to 0 in the
>> "After %d biterrors per subpage, read reported error %d\n"
>> code path.
>> ---
>> drivers/mtd/tests/nandbiterrs.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/mtd/tests/nandbiterrs.c b/drivers/mtd/tests/nandbiterrs.c
>> index f26dec896afa..41050bcae9f1 100644
>> --- a/drivers/mtd/tests/nandbiterrs.c
>> +++ b/drivers/mtd/tests/nandbiterrs.c
>> @@ -403,7 +403,6 @@ static int __init mtd_nandbiterrs_init(void)
>> if (err)
>> goto exit_error;
>>
>> - err = -EIO;
>> pr_info("finished successfully.\n");
>> printk(KERN_INFO "==================================================\n");
>>
>
> What are your thoughts on this patch?
Looks good to me.
Please note that the merge window is open and therefore we're busy
with duct taping. ;-)
Thanks,
//richard
More information about the linux-mtd
mailing list