staging: speakup: fix line over 80 characters.
authorBhagyashri Dighole <digholebhagyashri@gmail.com>
Thu, 28 Feb 2019 12:29:04 +0000 (17:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2019 08:05:00 +0000 (09:05 +0100)
Fix coding style issues, which solves checkpatch.pl warning:
"WARNING: line over 80 characters".

Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/main.c
drivers/staging/speakup/speakup_decext.c
drivers/staging/speakup/speakup_dectlk.c
drivers/staging/speakup/speakup_soft.c
drivers/staging/speakup/spk_priv_keyinfo.h
drivers/staging/speakup/spk_ttyio.c
drivers/staging/speakup/varhandlers.c

index c092a8ea45e28dd9a321ba88ebe4d83d66c4941a..b6a65b0c18961555c4538be424d10ab5c0f5e698 100644 (file)
@@ -901,7 +901,8 @@ static int get_sentence_buf(struct vc_data *vc, int read_punc)
        while (start < end) {
                sentbuf[bn][i] = get_char(vc, (u_short *)start, &tmp);
                if (i > 0) {
-                       if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.' &&
+                       if (sentbuf[bn][i] == SPACE &&
+                           sentbuf[bn][i - 1] == '.' &&
                            numsentences[bn] < 9) {
                                /* Sentence Marker */
                                numsentences[bn]++;
@@ -1235,7 +1236,8 @@ int spk_set_key_info(const u_char *key_info, u_char *k_buffer)
        key_data_len = (states + 1) * (num_keys + 1);
        if (key_data_len + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) {
                pr_debug("too many key_infos (%d over %u)\n",
-                        key_data_len + SHIFT_TBL_SIZE + 4, (unsigned int)(sizeof(spk_key_buf)));
+                        key_data_len + SHIFT_TBL_SIZE + 4,
+                        (unsigned int)(sizeof(spk_key_buf)));
                return -EINVAL;
        }
        memset(k_buffer, 0, SHIFT_TBL_SIZE);
@@ -1249,8 +1251,8 @@ int spk_set_key_info(const u_char *key_info, u_char *k_buffer)
        for (i = 1; i <= states; i++) {
                ch = *cp1++;
                if (ch >= SHIFT_TBL_SIZE) {
-                       pr_debug("(%d) not valid shift state (max_allowed = %d)\n", ch,
-                                SHIFT_TBL_SIZE);
+                       pr_debug("(%d) not valid shift state (max_allowed = %d)\n",
+                                ch, SHIFT_TBL_SIZE);
                        return -EINVAL;
                }
                spk_shift_table[ch] = i;
@@ -1258,7 +1260,8 @@ int spk_set_key_info(const u_char *key_info, u_char *k_buffer)
        keymap_flags = *cp1++;
        while ((ch = *cp1)) {
                if (ch >= MAX_KEY) {
-                       pr_debug("(%d), not valid key, (max_allowed = %d)\n", ch, MAX_KEY);
+                       pr_debug("(%d), not valid key, (max_allowed = %d)\n",
+                                ch, MAX_KEY);
                        return -EINVAL;
                }
                spk_our_keys[ch] = cp1;
index 3741c0fcf5bbebdd80afd639abbe265e6279630f..ddbb7e97d118348ff8bc4ecade7fb1df7d7bc3b4 100644 (file)
@@ -192,7 +192,8 @@ static void do_catch_up(struct spk_synth *synth)
                                synth->io_ops->synth_out(synth, PROCSPEECH);
                        if (time_after_eq(jiffies, jiff_max)) {
                                if (!in_escape)
-                                       synth->io_ops->synth_out(synth, PROCSPEECH);
+                                       synth->io_ops->synth_out(synth,
+                                                                PROCSPEECH);
                                spin_lock_irqsave(&speakup_info.spinlock,
                                                  flags);
                                jiffy_delta_val = jiffy_delta->u.n.value;
index a144f28ee1a8a477369f43d99080701f0b74562a..dccb4ea29d379f27e8298d307ad7fe2d015a0f29 100644 (file)
@@ -260,7 +260,8 @@ static void do_catch_up(struct spk_synth *synth)
                                synth->io_ops->synth_out(synth, PROCSPEECH);
                        if (time_after_eq(jiffies, jiff_max)) {
                                if (!in_escape)
-                                       synth->io_ops->synth_out(synth, PROCSPEECH);
+                                       synth->io_ops->synth_out(synth,
+                                                                PROCSPEECH);
                                spin_lock_irqsave(&speakup_info.spinlock,
                                                  flags);
                                jiffy_delta_val = jiffy_delta->u.n.value;
index 947c79532e1004818eea7ef94b101ec93303e2b2..edff6ce8565558f0671a4fb13119488a6dd254c4 100644 (file)
@@ -12,7 +12,9 @@
 #include <linux/unistd.h>
 #include <linux/miscdevice.h>  /* for misc_register, and SYNTH_MINOR */
 #include <linux/poll.h>                /* for poll_wait() */
-#include <linux/sched/signal.h> /* schedule(), signal_pending(), TASK_INTERRUPTIBLE */
+
+/* schedule(), signal_pending(), TASK_INTERRUPTIBLE */
+#include <linux/sched/signal.h>
 
 #include "spk_priv.h"
 #include "speakup.h"
index cc99fcd1bc6e42ba95be1d87275eea745fd789c0..1f789bd1c6788890fc12d334403dce67ceb53390 100644 (file)
 #define SPEAKUP_HELP           0x2d
 #define TOGGLE_CURSORING       0x2e
 #define READ_ALL_DOC           0x2f
-#define SPKUP_MAX_FUNC         0x30 /* one greater than the last func handler */
+
+/* one greater than the last func handler */
+#define SPKUP_MAX_FUNC         0x30
+
 #define SPK_KEY                0x80
 #define FIRST_EDIT_BITS        0x22
 #define FIRST_SET_VAR SPELL_DELAY
-#define VAR_START              0x40 /* increase if adding more than 0x3f functions */
+
+/* increase if adding more than 0x3f functions */
+#define VAR_START              0x40
 
 /* keys for setting variables, must be ordered same as the enum for var_ids */
 /* with dec being even and inc being 1 greater */
index 005de0024dd405086e6fa79fa5c1abf6c8d6ac83..0057eb980bec930023bbe4c12453b3deabdaec5d 100644 (file)
@@ -128,7 +128,8 @@ struct spk_io_ops spk_ttyio_ops = {
 };
 EXPORT_SYMBOL_GPL(spk_ttyio_ops);
 
-static inline void get_termios(struct tty_struct *tty, struct ktermios *out_termios)
+static inline void get_termios(struct tty_struct *tty,
+                              struct ktermios *out_termios)
 {
        down_read(&tty->termios_rwsem);
        *out_termios = tty->termios;
@@ -167,8 +168,9 @@ static int spk_ttyio_initialise_ldisc(struct spk_synth *synth)
                tmp_termios.c_cflag |= CRTSCTS;
                tty_set_termios(tty, &tmp_termios);
                /*
-                * check c_cflag to see if it's updated as tty_set_termios may not return
-                * error even when no tty bits are changed by the request.
+                * check c_cflag to see if it's updated as tty_set_termios
+                * may not return error even when no tty bits are
+                * changed by the request.
                 */
                get_termios(tty, &tmp_termios);
                if (!(tmp_termios.c_cflag & CRTSCTS))
@@ -207,10 +209,11 @@ static int spk_ttyio_out(struct spk_synth *in_synth, const char ch)
                        /* No room */
                        return 0;
                if (ret < 0) {
-                       pr_warn("%s: I/O error, deactivating speakup\n", in_synth->long_name);
-                       /* No synth any more, so nobody will restart TTYs, and we thus
-                        * need to do it ourselves.  Now that there is no synth we can
-                        * let application flood anyway
+                       pr_warn("%s: I/O error, deactivating speakup\n",
+                               in_synth->long_name);
+                       /* No synth any more, so nobody will restart TTYs,
+                        * and we thus need to do it ourselves.  Now that there
+                        * is no synth we can let application flood anyway
                         */
                        in_synth->alive = 0;
                        speakup_start_ttys();
@@ -371,7 +374,8 @@ const char *spk_ttyio_synth_immediate(struct spk_synth *synth, const char *buff)
        while ((ch = *buff)) {
                if (ch == '\n')
                        ch = synth->procspeech;
-               if (tty_write_room(speakup_tty) < 1 || !synth->io_ops->synth_out(synth, ch))
+               if (tty_write_room(speakup_tty) < 1 ||
+                   !synth->io_ops->synth_out(synth, ch))
                        return buff;
                buff++;
        }
index 3c944cb8f547371dc0c16312103d18f7694669bd..5741d1cb6227dd8fd59ae358368f8534e828bbcb 100644 (file)
@@ -238,7 +238,8 @@ int spk_set_num_var(int input, struct st_var_header *var, int how)
        if (!var_data->u.n.out_str)
                sprintf(cp, var_data->u.n.synth_fmt, (int)val);
        else
-               sprintf(cp, var_data->u.n.synth_fmt, var_data->u.n.out_str[val]);
+               sprintf(cp, var_data->u.n.synth_fmt,
+                       var_data->u.n.out_str[val]);
        synth_printf("%s", cp);
        return 0;
 }