From: Ted Juan <ted.juan@gmail.com>
To: computersforpeace@gmail.com
Cc: Ted Juan <ted.juan@weintek.com>,
linux-mtd@lists.infradead.org, pekon@ti.com
Subject: [PATCH] mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions
Date: Fri, 20 Jun 2014 17:11:56 +0800 [thread overview]
Message-ID: <1403255516-28413-1-git-send-email-ted.juan@gmail.com> (raw)
From: Ted Juan <ted.juan@weintek.com>
These two function's switch case lack the 'break' that make them always return error.
Signed-off-by: Ted Juan <ted.juan@weintek.com>
---
drivers/mtd/devices/elm.c | 2 ++
"toreqq\033\033qq\033\033" | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 "toreqq\033\033qq\033\033"
diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index 7df8694..b4f61c7 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -475,6 +475,7 @@ static int elm_context_save(struct elm_info *info)
ELM_SYNDROME_FRAGMENT_1 + offset);
regs->elm_syndrome_fragment_0[i] = elm_read_reg(info,
ELM_SYNDROME_FRAGMENT_0 + offset);
+ break;
default:
return -EINVAL;
}
@@ -520,6 +521,7 @@ static int elm_context_restore(struct elm_info *info)
regs->elm_syndrome_fragment_1[i]);
elm_write_reg(info, ELM_SYNDROME_FRAGMENT_0 + offset,
regs->elm_syndrome_fragment_0[i]);
+ break;
default:
return -EINVAL;
}
diff --git "a/toreqq\033\033qq\033\033" "b/toreqq\033\033qq\033\033"
new file mode 100644
index 0000000..4a7b35c
--- /dev/null
+++ "b/toreqq\033\033qq\033\033"
@@ -0,0 +1,20 @@
+^[[1mdiff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c^[[m
+^[[1mindex 7df8694..8e6ba6c 100644^[[m
+^[[1m--- a/drivers/mtd/devices/elm.c^[[m
+^[[1m+++ b/drivers/mtd/devices/elm.c^[[m
+^[[36m@@ -475,6 +475,7 @@^[[m ^[[mstatic int elm_context_save(struct elm_info *info)^[[m
+ ELM_SYNDROME_FRAGMENT_1 + offset);^[[m
+ regs->elm_syndrome_fragment_0[i] = elm_read_reg(info,^[[m
+ ELM_SYNDROME_FRAGMENT_0 + offset);^[[m
+^[[32m+^[[m^[[32m break;^[[m
+ default:^[[m
+ return -EINVAL;^[[m
+ }^[[m
+^[[36m@@ -520,6 +521,7 @@^[[m ^[[mstatic int elm_context_restore(struct elm_info *info)^[[m
+ regs->elm_syndrome_fragment_1[i]);^[[m
+ elm_write_reg(info, ELM_SYNDROME_FRAGMENT_0 + offset,^[[m
+ regs->elm_syndrome_fragment_0[i]);^[[m
+^[[32m+^[[m^[[32m break;^[[m
+ default:^[[m
+ return -EINVAL;^[[m
+ }^[[m
--
1.7.9.5
next reply other threads:[~2014-06-20 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 9:11 Ted Juan [this message]
2014-06-20 9:32 ` [PATCH] mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions Ted Juan
2014-06-20 9:45 ` Gupta, Pekon
2014-07-05 22:50 ` Brian Norris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403255516-28413-1-git-send-email-ted.juan@gmail.com \
--to=ted.juan@gmail.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=pekon@ti.com \
--cc=ted.juan@weintek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox