[PATCH V2] mtd:nor:timeout:fix do_write_buffer() timeout error
christian.riesch at omicron.at
Mon Jun 23 23:07:56 PDT 2014
On Tue, Jun 24, 2014 at 2:50 AM, Bean Huo 霍斌斌 (beanhuo)
<beanhuo at micron.com> wrote:
>>I tried to test this version of your patch, but cannot apply it. On which kernel version does it apply?
> This patch checkout from mainline 3.15.0-rc8,and git address as below:
I took your patch (v2) from patchwork and tried with 3.15-rc8:
$ cd linux
$ git checkout v3.15-rc8
HEAD is now at fad01e8... Linux 3.15-rc8
$ wget -nv http://patchwork.ozlabs.org/patch/362656/mbox/ -O pw-362656.patch
2014-06-24 07:58:02 URL:http://patchwork.ozlabs.org/patch/362656/mbox/
[3918/3918] -> "pw-362656.patch" 
$ git am pw-362656.patch
Applying: mtd:nor:timeout:fix do_write_buffer() timeout error
/home/chrrie00/linux/.git/rebase-apply/patch:53: trailing whitespace.
unsigned long uWriteTimeout =
error: patch failed: drivers/mtd/chips/cfi_cmdset_0002.c:1462
error: drivers/mtd/chips/cfi_cmdset_0002.c: patch does not apply
Patch failed at 0001 mtd:nor:timeout:fix do_write_buffer() timeout error
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Using git am --whitespace=fix didn't work either.
>>> unsigned long timeo = jiffies + HZ;
>>> - /* see comments in do_write_oneword() regarding uWriteTimeo. */
>>> - unsigned long uWriteTimeout = ( HZ / 1000 ) + 1;
>>> + /* The size of the buffer program has been increased from 256 to 512,
>>> + * 2ms maximum timeout can not adapt to all the different vendor's
>>> + * norflash.There maximum timeout information in the CFI area,so the
>>> + * best way is to choose the result calculated according to timeout
>>> + * field of struct cfi_ident that probed from norflash's CFI aera,see
>>> + * comments in cfi_cmdset_0002().uWriteTimeout is used for timeout step,
>>> + * it must be concerted into jiffies.
>>I think the reference to the old 2ms timeout only confuses readers, since they don't know the old code. Putting this into the commit message is sufficient.
> I think you could delete this comment here.
> OK,thanks for your suggest,I will put this message into commit message.
>>> + */
>>> + unsigned long uWriteTimeout =
>>Trailing whitespace, please remove that. Please run your patch through scripts/checkpatch.pl to detect such errors.
> I have checked it by checkpatch.pl,but no error and warning.
$ ./scripts/checkpatch.pl pw-362656.patch
ERROR: trailing whitespace
#78: FILE: drivers/mtd/chips/cfi_cmdset_0002.c:1486:
+^Iunsigned long uWriteTimeout = $
total: 1 errors, 0 warnings, 42 lines checked
NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
pw-362656.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
> i will double check it in the next version.
I will try with v3 now.
Maybe your email client messes the patch up? Are you using git
send-email or something else?
> i hope this patch can be accepted as soon as possible. I want to commit other timeout error patches.thanks!
Please note that I am not the maintainer here.
More information about the linux-mtd