staging: speakup: fixes braces {} should be used on all arms of this statement
PATCH 1/1 staging: speakup: fixes braces {} should be used on all arms of this statement
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 <[email protected]>
--- 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(-)
drivers/staging/speakup/main.c +2 -1
@@ -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)); }
drivers/staging/speakup/speakup_decext.c +3 -3
@@ -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)) {
drivers/staging/speakup/speakup_decpc.c +3 -3
@@ -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)) {
drivers/staging/speakup/speakup_dectlk.c +3 -3
@@ -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)) {
drivers/staging/speakup/varhandlers.c +7 -5
@@ -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 ;
Signature · 1 line
2.11.0