projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4379075
)
mtd: subpagetest: fix wrong written check in function write_eraseblock2
author
Xiaolei Li
<
[email protected]
>
Thu, 1 Jun 2017 09:01:19 +0000
(17:01 +0800)
committer
Brian Norris
<
[email protected]
>
Thu, 8 Jun 2017 23:39:21 +0000
(16:39 -0700)
Write size in function write_eraseblock2 is subpgsize * k.
It is wrong to check whether written is equal to subpgsize after each
mtd_write.
Signed-off-by: Xiaolei Li <
[email protected]
>
Reviewed-by: Richard Weinberger <
[email protected]
>
Acked-by: Boris Brezillon <
[email protected]
>
Signed-off-by: Brian Norris <
[email protected]
>
drivers/mtd/tests/subpagetest.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/tests/subpagetest.c
b/drivers/mtd/tests/subpagetest.c
index aecc6ce5a9e1c131a38d657325356ab590de845c..fa2519ad2435eea3c2b32a00ce507d59acc6aba1 100644
(file)
--- a/
drivers/mtd/tests/subpagetest.c
+++ b/
drivers/mtd/tests/subpagetest.c
@@
-102,7
+102,7
@@
static int write_eraseblock2(int ebnum)
if (unlikely(err || written != subpgsize * k)) {
pr_err("error: write failed at %#llx\n",
(long long)addr);
- if (written != subpgsize) {
+ if (written != subpgsize
* k
) {
pr_err(" write size: %#x\n",
subpgsize * k);
pr_err(" written: %#08zx\n",