[PATCH v5] mtd:nor:timeout:fix do_write_buffer() timeout error
Bean Huo
beanhuo at outlook.com
Wed Jul 16 01:48:49 PDT 2014
>> + if (cfi->cfiq->BufWriteTimeoutTyp &&
>> + cfi->cfiq->BufWriteTimeoutMax){
>> + cfi->chips[i].buffer_write_time_max =
>> + 1<<(cfi->cfiq->BufWriteTimeoutTyp +
>> + cfi->cfiq->BufWriteTimeoutMax);
>> + } else {
>> + cfi->chips[i].buffer_write_time_max = 0;
>> + }
>
> Please keep the coding style as below.
>
> if ( ) {
> ...
> } else {
> ...
> }
>
If I keep coding style as above.this will be beyond the requirements of one line length.
I also saw othter files use the same code style as mine.please see:cfi_cmdset_0001.c
if (cfi->cfiq->WordWriteTimeoutTyp &&
cfi->cfiq->WordWriteTimeoutMax)
cfi->chips[i].word_write_time_max =
1<<(cfi->cfiq->WordWriteTimeoutTyp +
cfi->cfiq->WordWriteTimeoutMax);
else
cfi->chips[i].word_write_time_max = 50000 * 8;
Note: beacuse I cann't send mail by git in office,I send this patch by web mail client.So,
there still a error stype in this patch(web mail client will remove some spaces),that is one space required before that '>='.I will send again this patch at home.
For your coding style advice, I will take into account,but i don't know if can put one line.
More information about the linux-mtd
mailing list