staging: speakup: Removed blank line after open braces.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 staging: speakup: Removed blank line after open braces.
Remove blank line after open braces, to fix the following checkpatch issue:
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by Varsha Rao <[email protected]>
--- drivers/staging/speakup/kobjects.c | 1 - drivers/staging/speakup/serialio.c | 1 - 2 files changed, 2 deletions(-)
drivers/staging/speakup/kobjects.c +0 -1
@@ -129,7 +129,6 @@ static ssize_t chars_chartab_store(struct kobject *kobj,spin_lock_irqsave (&speakup_info.spinlock, flags);while (cp < end) { -while ((cp < end) && (*cp ==' ' || *cp =='\t' )) cp++;
drivers/staging/speakup/serialio.c +0 -1
@@ -97,7 +97,6 @@ static irqreturn_t synth_readbuf_handler(int irq, void *dev_id)spin_lock_irqsave (&speakup_info.spinlock, flags);while (inb_p (speakup_info.port_tts +UART_LSR ) &UART_LSR_DR ) { - c =inb_p (speakup_info.port_tts+UART_RX ); synth->read_buff_add ((u_char )c); }
Signature · 1 line
2.9.3
PATCH 2/2 staging: speakup: Added spaces around arithmetic operators.
In reply to a message not in the archiveAdded spaces around arithmetic operators (+, -, /), to fix the checkpatch issue.
Signed-off-by Varsha Rao <[email protected]>
--- drivers/staging/speakup/kobjects.c | 6 +++--- drivers/staging/speakup/selection.c | 2 +- drivers/staging/speakup/serialio.c | 12 ++++++------ drivers/staging/speakup/speakup_acntpc.c | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-)
drivers/staging/speakup/kobjects.c +3 -3
@@ -291,7 +291,7 @@ static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, i *= (int )cp1[-1 ] +1 ; i +=2 ;/* 0 and last map ver */ if (cp1[-3 ] !=KEY_MAP_VER || cp1[-1 ] >10 || - i+SHIFT_TBL_SIZE +4 >=sizeof (spk_key_buf)) { + i +SHIFT_TBL_SIZE +4 >=sizeof (spk_key_buf)) {pr_warn ("i %d %d %d %d\n" , i, (int )cp1[-3 ], (int )cp1[-2 ], (int )cp1[-1 ]);kfree (in_buff);
@@ -483,7 +483,7 @@ static ssize_t punc_show(struct kobject *kobj, struct kobj_attribute *attr, *cp++ = (char )i; }spin_unlock_irqrestore (&speakup_info.spinlock, flags); -return cp-buf; +return cp - buf; }/*
@@ -574,7 +574,7 @@ ssize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr, *cp1++ ='"' ; *cp1++ ='\n' ; *cp1 ='\0' ; - rv = cp1-buf; + rv = cp1 - buf; }else { rv =sprintf (buf,"\"\"\n" ); }
drivers/staging/speakup/selection.c +1 -1
@@ -99,7 +99,7 @@ int speakup_set_selection(struct tty_struct *tty) sel_start = new_sel_start; sel_end = new_sel_end;/* Allocate a new buffer before freeing the old one ... */ - bp =kmalloc ((sel_end-sel_start)/2 +1 ,GFP_ATOMIC ); + bp =kmalloc ((sel_end - sel_start) /2 +1 ,GFP_ATOMIC );if (!bp) {speakup_clear_selection ();return -ENOMEM ;
drivers/staging/speakup/serialio.c +6 -6
@@ -97,7 +97,7 @@ static irqreturn_t synth_readbuf_handler(int irq, void *dev_id)spin_lock_irqsave (&speakup_info.spinlock, flags);while (inb_p (speakup_info.port_tts +UART_LSR ) &UART_LSR_DR ) { - c =inb_p (speakup_info.port_tts+UART_RX ); + c =inb_p (speakup_info.port_tts +UART_RX ); synth->read_buff_add ((u_char )c); }spin_unlock_irqrestore (&speakup_info.spinlock, flags);
@@ -122,10 +122,10 @@ static void start_serial_interrupt(int irq)/* Turn on Interrupts */ outb (UART_IER_MSI |UART_IER_RLSI |UART_IER_RDI , speakup_info.port_tts +UART_IER ); -inb (speakup_info.port_tts+UART_LSR ); -inb (speakup_info.port_tts+UART_RX ); -inb (speakup_info.port_tts+UART_IIR ); -inb (speakup_info.port_tts+UART_MSR ); +inb (speakup_info.port_tts +UART_LSR ); +inb (speakup_info.port_tts +UART_RX ); +inb (speakup_info.port_tts +UART_IIR ); +inb (speakup_info.port_tts +UART_MSR );outb (1 , speakup_info.port_tts +UART_FCR );/* Turn FIFO On */ }
@@ -138,7 +138,7 @@ void spk_stop_serial_interrupt(void)return ;/* Turn off interrupts */ -outb (0 , speakup_info.port_tts+UART_IER ); +outb (0 , speakup_info.port_tts +UART_IER );/* Free IRQ */ free_irq (serstate->irq, (void *)synth_readbuf_handler); }
drivers/staging/speakup/speakup_acntpc.c +5 -5
@@ -233,7 +233,7 @@ static void do_catch_up(struct spk_synth *synth) delay_time_val = delay_time->u.n.value;spin_unlock_irqrestore (&speakup_info.spinlock, flags);schedule_timeout (msecs_to_jiffies (delay_time_val)); - jiff_max = jiffies+jiffy_delta_val; + jiff_max = jiffies + jiffy_delta_val; } } timeout =SPK_XMITR_TIMEOUT ;
@@ -260,13 +260,13 @@ static int synth_probe(struct spk_synth *synth) speakup_info.port_tts = port_forced;pr_info ("probe forced to %x by kernel command line\n" , speakup_info.port_tts); -if (synth_request_region (speakup_info.port_tts-1 , +if (synth_request_region (speakup_info.port_tts -1 ,SYNTH_IO_EXTENT )) {pr_warn ("sorry, port already reserved\n" );return -EBUSY ; } - port_val =inw (speakup_info.port_tts-1 ); - synth_port_control = speakup_info.port_tts-1 ; + port_val =inw (speakup_info.port_tts -1 ); + synth_port_control = speakup_info.port_tts -1 ; }else {for (i =0 ; synth_portlist[i]; i++) { if (synth_request_region(synth_portlist[i],
@@ -294,7 +294,7 @@ static int synth_probe(struct spk_synth *synth)return -ENODEV ; }pr_info ("%s: %03x-%03x, driver version %s,\n" , synth->long_name, - synth_port_control, synth_port_control+SYNTH_IO_EXTENT -1 , + synth_port_control, synth_port_control +SYNTH_IO_EXTENT -1 , synth->version); synth->alive =1 ;return 0 ;
Signature · 1 line
2.9.3