]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: speakup: Added spaces around arithmetic operators.
authorVarsha Rao <rvarsha016@gmail.com>
Wed, 22 Feb 2017 17:46:40 +0000 (23:16 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:02 +0000 (09:17 +0100)
Added spaces around arithmetic operators (+, -, /), to fix the checkpatch
issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/kobjects.c
drivers/staging/speakup/selection.c
drivers/staging/speakup/serialio.c
drivers/staging/speakup/speakup_acntpc.c

index 77e6deebb22b6478b1501c6ad48b45329e40ab42..ca075fe26d3f9e7ca5a9b08d806969d0c1862ed4 100644 (file)
@@ -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");
                }
index aeb2b865615a522471558e154bacff1c71af9c97..afd9a446a06f49a6a08541e76bf2151c2acb4581 100644 (file)
@@ -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;
index 87d33185059ec1a2cc7bb95dcdd36aff4053a2da..657a48b6f8d3d5fc32c478793be4f412084826ef 100644 (file)
@@ -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);
 }
index c7fab261d8602f2752664fd53ef30b9453a24bb0..cf6fcd63498d498435cca28e6f3cf5e6a2caf337 100644 (file)
@@ -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;