Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2d55017 authored by Bhagyashri Dighole's avatar Bhagyashri Dighole Committed by Greg Kroah-Hartman
Browse files

staging: speakup: fix line over 80 characters.



Fix coding style issues, which solves checkpatch.pl warning:
"WARNING: line over 80 characters".

Signed-off-by: default avatarBhagyashri Dighole <digholebhagyashri@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ac04f6e4
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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;
+3 −1
Original line number Diff line number Diff line
@@ -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"
+7 −2
Original line number Diff line number Diff line
@@ -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 */
Loading