From: Arushi Singhal <arushisinghal19971997@gmail.com>
To: w.d.hubbs@gmail.com
Cc: chris@the-brannons.com, outreachy-kernel@googlegroups.com,
kirk@reisers.ca, samuel.thibault@ens-lyon.org,
gregkh@linuxfoundation.org, speakup@linux-speakup.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
aditya.shankar@microchip.com, ganesh.krishna@microchip.com,
linux-wireless@vger.kernel.org,
Arushi Singhal <arushisinghal19971997@gmail.com>
Subject: [PATCH 1/6] staging: speakup: fixes braces {} should be used on all arms of this statement
Date: Sat, 4 Mar 2017 21:27:35 +0530 [thread overview]
Message-ID: <20170304155740.26105-2-arushisinghal19971997@gmail.com> (raw)
In-Reply-To: <20170304155740.26105-1-arushisinghal19971997@gmail.com>
This patch fixes the checks reported by checkpatch.pl
for braces {} should be used on all arms of this statement.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
drivers/staging/speakup/main.c | 3 ++-
drivers/staging/speakup/speakup_decext.c | 6 +++---
drivers/staging/speakup/speakup_decpc.c | 6 +++---
drivers/staging/speakup/speakup_dectlk.c | 6 +++---
drivers/staging/speakup/varhandlers.c | 12 +++++++-----
5 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index a3daf4ae5c0a..47cea629ba0b 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -408,8 +408,9 @@ static void say_attributes(struct vc_data *vc)
if (bg > 7) {
synth_printf(" %s ", spk_msg_get(MSG_ON_BLINKING));
bg -= 8;
- } else
+ } else {
synth_printf(" %s ", spk_msg_get(MSG_ON));
+ }
synth_printf("%s\n", spk_msg_get(MSG_COLORS_START + bg));
}
diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
index 5f9f3a7543db..6ebd56e07e71 100644
--- a/drivers/staging/speakup/speakup_decext.c
+++ b/drivers/staging/speakup/speakup_decext.c
@@ -193,11 +193,11 @@ static void do_catch_up(struct spk_synth *synth)
spin_lock_irqsave(&speakup_info.spinlock, flags);
synth_buffer_getc();
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
- if (ch == '[')
+ if (ch == '[') {
in_escape = 1;
- else if (ch == ']')
+ } else if (ch == ']') {
in_escape = 0;
- else if (ch <= SPACE) {
+ } else if (ch <= SPACE) {
if (!in_escape && strchr(",.!?;:", last))
spk_serial_out(PROCSPEECH);
if (time_after_eq(jiffies, jiff_max)) {
diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c
index 600eb057f830..dc860c4b8279 100644
--- a/drivers/staging/speakup/speakup_decpc.c
+++ b/drivers/staging/speakup/speakup_decpc.c
@@ -410,11 +410,11 @@ static void do_catch_up(struct spk_synth *synth)
spin_lock_irqsave(&speakup_info.spinlock, flags);
synth_buffer_getc();
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
- if (ch == '[')
+ if (ch == '[') {
in_escape = 1;
- else if (ch == ']')
+ } else if (ch == ']') {
in_escape = 0;
- else if (ch <= SPACE) {
+ } else if (ch <= SPACE) {
if (!in_escape && strchr(",.!?;:", last))
dt_sendchar(PROCSPEECH);
if (time_after_eq(jiffies, jiff_max)) {
diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
index 26036050cdb2..2429232ee649 100644
--- a/drivers/staging/speakup/speakup_dectlk.c
+++ b/drivers/staging/speakup/speakup_dectlk.c
@@ -258,11 +258,11 @@ static void do_catch_up(struct spk_synth *synth)
spin_lock_irqsave(&speakup_info.spinlock, flags);
synth_buffer_getc();
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
- if (ch == '[')
+ if (ch == '[') {
in_escape = 1;
- else if (ch == ']')
+ } else if (ch == ']') {
in_escape = 0;
- else if (ch <= SPACE) {
+ } else if (ch <= SPACE) {
if (!in_escape && strchr(",.!?;:", last))
spk_serial_out(PROCSPEECH);
if (time_after_eq(jiffies, jiff_max)) {
diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c
index 5910fe0b1365..d37d24e26641 100644
--- a/drivers/staging/speakup/varhandlers.c
+++ b/drivers/staging/speakup/varhandlers.c
@@ -258,10 +258,11 @@ int spk_set_string_var(const char *page, struct st_var_header *var, int len)
if (var->p_val != var_data->u.s.default_val)
strcpy((char *)var->p_val, var_data->u.s.default_val);
return -ERESTART;
- } else if (var->p_val)
+ } else if (var->p_val) {
strcpy((char *)var->p_val, page);
- else
+ } else {
return -E2BIG;
+ }
return 0;
}
@@ -281,17 +282,18 @@ int spk_set_mask_bits(const char *input, const int which, const int how)
spk_chartab[*cp] &= ~mask;
}
cp = (u_char *)input;
- if (!cp)
+ if (!cp) {
cp = spk_punc_info[which].value;
- else {
+ } else {
for (; *cp; cp++) {
if (*cp < SPACE)
break;
if (mask < PUNC) {
if (!(spk_chartab[*cp] & PUNC))
break;
- } else if (spk_chartab[*cp] & B_NUM)
+ } else if (spk_chartab[*cp] & B_NUM) {
break;
+ }
}
if (*cp)
return -EINVAL;
--
2.11.0
next prev parent reply other threads:[~2017-03-04 15:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-04 15:57 [PATCH 0/6] multiple checkpatch issues Arushi Singhal
2017-03-04 15:57 ` Arushi Singhal [this message]
2017-03-04 15:57 ` [PATCH 2/6] staging: speakup: Avoid multiple assignments on same line Arushi Singhal
2017-03-04 15:57 ` [PATCH 3/6] staging: speakup: identation should use tabs Arushi Singhal
2017-03-04 15:57 ` [PATCH 4/6] staging: wilc1000: Alignment should match open parenthesis Arushi Singhal
2017-03-04 15:57 ` [PATCH 5/6] staging: wilc1000: function prototype argument should have identifier name Arushi Singhal
2017-03-04 15:57 ` [PATCH 6/6] staging: wilc1000: Logical continuations should be on the previous line Arushi Singhal
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=20170304155740.26105-2-arushisinghal19971997@gmail.com \
--to=arushisinghal19971997@gmail.com \
--cc=aditya.shankar@microchip.com \
--cc=chris@the-brannons.com \
--cc=devel@driverdev.osuosl.org \
--cc=ganesh.krishna@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).