* [PATCH 0/2] Improve code readability
@ 2017-03-10 20:41 Arushi Singhal
2017-03-10 20:41 ` [PATCH 1/2] staging: speakup: Avoid multiple assignments on same line Arushi Singhal
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Arushi Singhal @ 2017-03-10 20:41 UTC (permalink / raw)
To: w.d.hubbs
Cc: chris, outreachy-kernel, kirk, samuel.thibault, gregkh, speakup,
devel, linux-kernel, Arushi Singhal
Improve readability by fixing multiple checkpatch.pl
issues.
Arushi Singhal (2):
staging: speakup: Avoid multiple assignments on same line
staging: speakup: fixes braces {} should be used on all arms of this
statement
drivers/staging/speakup/main.c | 6 ++++--
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, 20 insertions(+), 16 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] staging: speakup: Avoid multiple assignments on same line
2017-03-10 20:41 [PATCH 0/2] Improve code readability Arushi Singhal
@ 2017-03-10 20:41 ` Arushi Singhal
2017-03-10 20:41 ` [PATCH 2/2] staging: speakup: fixes braces {} should be used on all arms of this statement Arushi Singhal
[not found] ` <e3451e76-4119-4ea9-8bd0-134de6504fd0@googlegroups.com>
2 siblings, 0 replies; 5+ messages in thread
From: Arushi Singhal @ 2017-03-10 20:41 UTC (permalink / raw)
To: w.d.hubbs
Cc: chris, outreachy-kernel, kirk, samuel.thibault, gregkh, speakup,
devel, linux-kernel, Arushi Singhal
This patch fixes the checkpatch.pl warning "multiple assignments
should be avoided."
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
drivers/staging/speakup/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 00335eb2ff20..3ecf2e41bf1f 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -2093,7 +2093,8 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
spk_keydown = 0;
goto out;
}
- value = spk_lastkey = pad_chars[value];
+ value = pad_chars[value];
+ spk_lastkey = value;
spk_keydown++;
spk_parked &= 0xfe;
goto no_map;
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] staging: speakup: fixes braces {} should be used on all arms of this statement
2017-03-10 20:41 [PATCH 0/2] Improve code readability Arushi Singhal
2017-03-10 20:41 ` [PATCH 1/2] staging: speakup: Avoid multiple assignments on same line Arushi Singhal
@ 2017-03-10 20:41 ` Arushi Singhal
[not found] ` <e3451e76-4119-4ea9-8bd0-134de6504fd0@googlegroups.com>
2 siblings, 0 replies; 5+ messages in thread
From: Arushi Singhal @ 2017-03-10 20:41 UTC (permalink / raw)
To: w.d.hubbs
Cc: chris, outreachy-kernel, kirk, samuel.thibault, gregkh, speakup,
devel, linux-kernel, Arushi Singhal
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 3ecf2e41bf1f..6786cfab7460 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -405,8 +405,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 34e03c6b1ae5..77a935658af5 100644
--- a/drivers/staging/speakup/speakup_decext.c
+++ b/drivers/staging/speakup/speakup_decext.c
@@ -194,11 +194,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 afe2da34a3f7..100c65b38860 100644
--- a/drivers/staging/speakup/speakup_decpc.c
+++ b/drivers/staging/speakup/speakup_decpc.c
@@ -409,11 +409,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 e0f2d6121890..d7d5e0e6e297 100644
--- a/drivers/staging/speakup/speakup_dectlk.c
+++ b/drivers/staging/speakup/speakup_dectlk.c
@@ -259,11 +259,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 cc984196020f..066f8461f4d3 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH 0/2] Improve code readability
[not found] ` <e3451e76-4119-4ea9-8bd0-134de6504fd0@googlegroups.com>
@ 2017-03-15 9:33 ` Julia Lawall
2017-03-16 1:49 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2017-03-15 9:33 UTC (permalink / raw)
To: Arushi Singhal
Cc: outreachy-kernel, w.d.hubbs, chris, kirk, samuel.thibault,
gregkh, speakup, devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
On Wed, 15 Mar 2017, Arushi Singhal wrote:
> HiThis Patch series is not yet added to the kernel tree.
The normal process is to send it again, with RESEND inside the [PATCH]
box.
julia
> Thanks
> Arushi
>
> On Saturday, 11 March 2017 02:12:02 UTC+5:30, Arushi Singhal wrote:
> Improve readability by fixing multiple checkpatch.pl
> issues.
>
> Arushi Singhal (2):
> staging: speakup: Avoid multiple assignments on same line
> staging: speakup: fixes braces {} should be used on all arms
> of this
> statement
>
> drivers/staging/speakup/main.c | 6 ++++--
> 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, 20 insertions(+), 16 deletions(-)
>
> --
> 2.11.0
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/e3451e76-4119-4ea9-8bd0-
> 134de6504fd0%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] Improve code readability
[not found] ` <e3451e76-4119-4ea9-8bd0-134de6504fd0@googlegroups.com>
2017-03-15 9:33 ` [Outreachy kernel] Re: [PATCH 0/2] Improve code readability Julia Lawall
@ 2017-03-16 1:49 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-03-16 1:49 UTC (permalink / raw)
To: Arushi Singhal
Cc: outreachy-kernel, w.d.hubbs, chris, kirk, samuel.thibault,
speakup, devel, linux-kernel
On Wed, Mar 15, 2017 at 01:39:19AM -0700, Arushi Singhal wrote:
> Hi
> This Patch series is not yet added to the kernel tree.
I don't see these in my queue either. I think maybe they were rejected
due to the incorrect subject: line that I think someone said needed to
be fixed? I can't remember, sorry, please rebase and resend if they are
still needed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-16 1:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 20:41 [PATCH 0/2] Improve code readability Arushi Singhal
2017-03-10 20:41 ` [PATCH 1/2] staging: speakup: Avoid multiple assignments on same line Arushi Singhal
2017-03-10 20:41 ` [PATCH 2/2] staging: speakup: fixes braces {} should be used on all arms of this statement Arushi Singhal
[not found] ` <e3451e76-4119-4ea9-8bd0-134de6504fd0@googlegroups.com>
2017-03-15 9:33 ` [Outreachy kernel] Re: [PATCH 0/2] Improve code readability Julia Lawall
2017-03-16 1:49 ` Greg KH
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).