staging: speakup: fix line over 80 characters.
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>
This commit is contained in:
parent
ac04f6e4b0
commit
e2d55017ae
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -61,11 +61,16 @@
|
|||
#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 */
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue