lkml.org 
[lkml]   [2020]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mtd:clear cache_state to avoid writing to bad clocks repeatedly
From
Date
On 2020/3/30 15:53, Miquel Raynal wrote:
> Hi Xiaoming,
>
> Xiaoming Ni <nixiaoming@huawei.com> wrote on Sat, 28 Mar 2020 21:01:17
> +0800:
>
>> The function call process is as follows:
>> mtd_blktrans_work()
>> while (1)
....

>> + *
>> + * if this cache_offset points to a bad block
>
> Can you start your sentences with a capital letter please?
>
> * If
>
>> + * data cannot be written to the device.
>> + * clear cache_state to avoid writing to bad clocks repeatedly
>
> * Clear
>
> And also please break your lines à 80, not 70.
>
>> */
>> - mtdblk->cache_state = STATE_EMPTY;
>> - return 0;
>> + if (ret == 0 || ret == -EIO)
>> + mtdblk->cache_state = STATE_EMPTY;
Should I add a warning print for EIO here


>> + return ret;
>> }
>>
>>
>
> Otherwise looks good to me.
>
> With the above addressed:
>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
>
>
> Thanks,
> Miquèl
>
> .

Thanks for your advice, I will send v2 patch later

Thanks,
Xiaoming Ni



\
 
 \ /
  Last update: 2020-03-30 10:45    [W:0.044 / U:1.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site