From: Wentao Cai <etsai042@gmail.com>
To: William Hubbs <w.d.hubbs@gmail.com>,
Chris Brannon <chris@the-brannons.com>,
Kirk Reiser <kirk@reisers.ca>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: outreachy-kernel@googlegroups.com, Wentao Cai <etsai042@gmail.com>
Subject: [PATCH] Staging: speakup: Change else-if block order
Date: Tue, 12 Mar 2019 02:15:12 -0700 [thread overview]
Message-ID: <20190312091512.2315-1-etsai042@gmail.com> (raw)
Change else-if block to silence checkpatch.pl warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Wentao Cai <etsai042@gmail.com>
---
drivers/staging/speakup/keyhelp.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c
index 5f1bda37f86d..23ec8f01e0a2 100644
--- a/drivers/staging/speakup/keyhelp.c
+++ b/drivers/staging/speakup/keyhelp.c
@@ -153,6 +153,12 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
return 1;
}
cur_item = letter_offsets[ch - 'a'];
+ } else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
+ !spk_special_handler) {
+ spk_special_handler = spk_handle_help;
+ synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
+ build_key_data(); /* rebuild each time in case new mapping */
+ return 1;
} else if (type == KT_CUR) {
if (ch == 0 &&
(MSG_FUNCNAMES_START + cur_item + 1) <= MSG_FUNCNAMES_END)
@@ -161,12 +167,6 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
cur_item--;
else
return -1;
- } else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
- !spk_special_handler) {
- spk_special_handler = spk_handle_help;
- synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
- build_key_data(); /* rebuild each time in case new mapping */
- return 1;
} else {
name = NULL;
if ((type != KT_SPKUP) && (key > 0) && (key <= num_key_names)) {
--
2.11.0
next reply other threads:[~2019-03-12 9:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 9:15 Wentao Cai [this message]
2019-03-12 9:54 ` [PATCH] Staging: speakup: Change else-if block order Samuel Thibault
2019-03-12 10:16 ` [Outreachy kernel] " Julia Lawall
2019-03-12 14:30 ` etsai042
2019-03-12 14:38 ` Julia Lawall
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=20190312091512.2315-1-etsai042@gmail.com \
--to=etsai042@gmail.com \
--cc=chris@the-brannons.com \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=outreachy-kernel@googlegroups.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=w.d.hubbs@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.