Commit d290effe authored by Shiva Kerdel's avatar Shiva Kerdel Committed by Greg Kroah-Hartman

Staging: speakup: Remove unnecessary space after cast

The affected files have been modified to remove redundant spaces after
casts to solve checkpatch.pl checks.
Signed-off-by: default avatarShiva Kerdel <shiva@exdev.nl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7970b9e6
...@@ -351,14 +351,14 @@ static void speakup_cut(struct vc_data *vc) ...@@ -351,14 +351,14 @@ static void speakup_cut(struct vc_data *vc)
if (!mark_cut_flag) { if (!mark_cut_flag) {
mark_cut_flag = 1; mark_cut_flag = 1;
spk_xs = (u_short) spk_x; spk_xs = (u_short)spk_x;
spk_ys = (u_short) spk_y; spk_ys = (u_short)spk_y;
spk_sel_cons = vc; spk_sel_cons = vc;
synth_printf("%s\n", spk_msg_get(MSG_MARK)); synth_printf("%s\n", spk_msg_get(MSG_MARK));
return; return;
} }
spk_xe = (u_short) spk_x; spk_xe = (u_short)spk_x;
spk_ye = (u_short) spk_y; spk_ye = (u_short)spk_y;
mark_cut_flag = 0; mark_cut_flag = 0;
synth_printf("%s\n", spk_msg_get(MSG_CUT)); synth_printf("%s\n", spk_msg_get(MSG_CUT));
...@@ -489,7 +489,7 @@ static void say_char(struct vc_data *vc) ...@@ -489,7 +489,7 @@ static void say_char(struct vc_data *vc)
u_short ch; u_short ch;
spk_old_attr = spk_attr; spk_old_attr = spk_attr;
ch = get_char(vc, (u_short *) spk_pos, &spk_attr); ch = get_char(vc, (u_short *)spk_pos, &spk_attr);
if (spk_attr != spk_old_attr) { if (spk_attr != spk_old_attr) {
if (spk_attrib_bleep & 1) if (spk_attrib_bleep & 1)
bleep(spk_y); bleep(spk_y);
...@@ -504,7 +504,7 @@ static void say_phonetic_char(struct vc_data *vc) ...@@ -504,7 +504,7 @@ static void say_phonetic_char(struct vc_data *vc)
u_short ch; u_short ch;
spk_old_attr = spk_attr; spk_old_attr = spk_attr;
ch = get_char(vc, (u_short *) spk_pos, &spk_attr); ch = get_char(vc, (u_short *)spk_pos, &spk_attr);
if (isascii(ch) && isalpha(ch)) { if (isascii(ch) && isalpha(ch)) {
ch &= 0x1f; ch &= 0x1f;
synth_printf("%s\n", phonetic[--ch]); synth_printf("%s\n", phonetic[--ch]);
...@@ -556,7 +556,7 @@ static u_long get_word(struct vc_data *vc) ...@@ -556,7 +556,7 @@ static u_long get_word(struct vc_data *vc)
u_char temp; u_char temp;
spk_old_attr = spk_attr; spk_old_attr = spk_attr;
ch = (char)get_char(vc, (u_short *) tmp_pos, &temp); ch = (char)get_char(vc, (u_short *)tmp_pos, &temp);
/* decided to take out the sayword if on a space (mis-information */ /* decided to take out the sayword if on a space (mis-information */
if (spk_say_word_ctl && ch == SPACE) { if (spk_say_word_ctl && ch == SPACE) {
...@@ -565,26 +565,26 @@ static u_long get_word(struct vc_data *vc) ...@@ -565,26 +565,26 @@ static u_long get_word(struct vc_data *vc)
return 0; return 0;
} else if ((tmpx < vc->vc_cols - 2) } else if ((tmpx < vc->vc_cols - 2)
&& (ch == SPACE || ch == 0 || IS_WDLM(ch)) && (ch == SPACE || ch == 0 || IS_WDLM(ch))
&& ((char)get_char(vc, (u_short *) &tmp_pos + 1, &temp) > && ((char)get_char(vc, (u_short *)&tmp_pos + 1, &temp) >
SPACE)) { SPACE)) {
tmp_pos += 2; tmp_pos += 2;
tmpx++; tmpx++;
} else } else
while (tmpx > 0) { while (tmpx > 0) {
ch = (char)get_char(vc, (u_short *) tmp_pos - 1, &temp); ch = (char)get_char(vc, (u_short *)tmp_pos - 1, &temp);
if ((ch == SPACE || ch == 0 || IS_WDLM(ch)) if ((ch == SPACE || ch == 0 || IS_WDLM(ch))
&& ((char)get_char(vc, (u_short *) tmp_pos, &temp) > && ((char)get_char(vc, (u_short *)tmp_pos, &temp) >
SPACE)) SPACE))
break; break;
tmp_pos -= 2; tmp_pos -= 2;
tmpx--; tmpx--;
} }
attr_ch = get_char(vc, (u_short *) tmp_pos, &spk_attr); attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr);
buf[cnt++] = attr_ch & 0xff; buf[cnt++] = attr_ch & 0xff;
while (tmpx < vc->vc_cols - 1) { while (tmpx < vc->vc_cols - 1) {
tmp_pos += 2; tmp_pos += 2;
tmpx++; tmpx++;
ch = (char)get_char(vc, (u_short *) tmp_pos, &temp); ch = (char)get_char(vc, (u_short *)tmp_pos, &temp);
if ((ch == SPACE) || ch == 0 if ((ch == SPACE) || ch == 0
|| (IS_WDLM(buf[cnt - 1]) && (ch > SPACE))) || (IS_WDLM(buf[cnt - 1]) && (ch > SPACE)))
break; break;
...@@ -639,7 +639,7 @@ static void say_prev_word(struct vc_data *vc) ...@@ -639,7 +639,7 @@ static void say_prev_word(struct vc_data *vc)
} else } else
spk_x--; spk_x--;
spk_pos -= 2; spk_pos -= 2;
ch = (char)get_char(vc, (u_short *) spk_pos, &temp); ch = (char)get_char(vc, (u_short *)spk_pos, &temp);
if (ch == SPACE || ch == 0) if (ch == SPACE || ch == 0)
state = 0; state = 0;
else if (IS_WDLM(ch)) else if (IS_WDLM(ch))
...@@ -672,7 +672,7 @@ static void say_next_word(struct vc_data *vc) ...@@ -672,7 +672,7 @@ static void say_next_word(struct vc_data *vc)
return; return;
} }
while (1) { while (1) {
ch = (char)get_char(vc, (u_short *) spk_pos, &temp); ch = (char)get_char(vc, (u_short *)spk_pos, &temp);
if (ch == SPACE || ch == 0) if (ch == SPACE || ch == 0)
state = 0; state = 0;
else if (IS_WDLM(ch)) else if (IS_WDLM(ch))
...@@ -709,7 +709,7 @@ static void spell_word(struct vc_data *vc) ...@@ -709,7 +709,7 @@ static void spell_word(struct vc_data *vc)
if (!get_word(vc)) if (!get_word(vc))
return; return;
while ((ch = (u_char) *cp)) { while ((ch = (u_char)*cp)) {
if (cp != buf) if (cp != buf)
synth_printf(" %s ", delay_str[spk_spell_delay]); synth_printf(" %s ", delay_str[spk_spell_delay]);
if (IS_CHAR(ch, B_CAP)) { if (IS_CHAR(ch, B_CAP)) {
...@@ -751,7 +751,7 @@ static int get_line(struct vc_data *vc) ...@@ -751,7 +751,7 @@ static int get_line(struct vc_data *vc)
spk_old_attr = spk_attr; spk_old_attr = spk_attr;
spk_attr = get_attributes(vc, (u_short *)spk_pos); spk_attr = get_attributes(vc, (u_short *)spk_pos);
for (i = 0; i < vc->vc_cols; i++) { for (i = 0; i < vc->vc_cols; i++) {
buf[i] = (u_char) get_char(vc, (u_short *) tmp, &tmp2); buf[i] = (u_char)get_char(vc, (u_short *)tmp, &tmp2);
tmp += 2; tmp += 2;
} }
for (--i; i >= 0; i--) for (--i; i >= 0; i--)
...@@ -816,7 +816,7 @@ static int say_from_to(struct vc_data *vc, u_long from, u_long to, ...@@ -816,7 +816,7 @@ static int say_from_to(struct vc_data *vc, u_long from, u_long to,
spk_old_attr = spk_attr; spk_old_attr = spk_attr;
spk_attr = get_attributes(vc, (u_short *)from); spk_attr = get_attributes(vc, (u_short *)from);
while (from < to) { while (from < to) {
buf[i++] = (char)get_char(vc, (u_short *) from, &tmp); buf[i++] = (char)get_char(vc, (u_short *)from, &tmp);
from += 2; from += 2;
if (i >= vc->vc_size_row) if (i >= vc->vc_size_row)
break; break;
...@@ -892,7 +892,7 @@ static int get_sentence_buf(struct vc_data *vc, int read_punc) ...@@ -892,7 +892,7 @@ static int get_sentence_buf(struct vc_data *vc, int read_punc)
spk_attr = get_attributes(vc, (u_short *)start); spk_attr = get_attributes(vc, (u_short *)start);
while (start < end) { while (start < end) {
sentbuf[bn][i] = (char)get_char(vc, (u_short *) start, &tmp); sentbuf[bn][i] = (char)get_char(vc, (u_short *)start, &tmp);
if (i > 0) { if (i > 0) {
if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.' if (sentbuf[bn][i] == SPACE && sentbuf[bn][i - 1] == '.'
&& numsentences[bn] < 9) { && numsentences[bn] < 9) {
...@@ -1040,7 +1040,7 @@ static void say_position(struct vc_data *vc) ...@@ -1040,7 +1040,7 @@ static void say_position(struct vc_data *vc)
static void say_char_num(struct vc_data *vc) static void say_char_num(struct vc_data *vc)
{ {
u_char tmp; u_char tmp;
u_short ch = get_char(vc, (u_short *) spk_pos, &tmp); u_short ch = get_char(vc, (u_short *)spk_pos, &tmp);
ch &= 0xff; ch &= 0xff;
synth_printf(spk_msg_get(MSG_CHAR_INFO), ch, ch); synth_printf(spk_msg_get(MSG_CHAR_INFO), ch, ch);
...@@ -1085,7 +1085,7 @@ static void spkup_write(const char *in_buf, int count) ...@@ -1085,7 +1085,7 @@ static void spkup_write(const char *in_buf, int count)
(currsentence <= numsentences[bn])) (currsentence <= numsentences[bn]))
synth_insert_next_index(currsentence++); synth_insert_next_index(currsentence++);
} }
ch = (u_char) *in_buf++; ch = (u_char)*in_buf++;
char_type = spk_chartab[ch]; char_type = spk_chartab[ch];
if (ch == old_ch && !(char_type & B_NUM)) { if (ch == old_ch && !(char_type & B_NUM)) {
if (++rep_count > 2) if (++rep_count > 2)
...@@ -1579,7 +1579,7 @@ static int count_highlight_color(struct vc_data *vc) ...@@ -1579,7 +1579,7 @@ static int count_highlight_color(struct vc_data *vc)
int cc; int cc;
int vc_num = vc->vc_num; int vc_num = vc->vc_num;
u16 ch; u16 ch;
u16 *start = (u16 *) vc->vc_origin; u16 *start = (u16 *)vc->vc_origin;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
speakup_console[vc_num]->ht.bgcount[i] = 0; speakup_console[vc_num]->ht.bgcount[i] = 0;
......
...@@ -137,7 +137,7 @@ static void __speakup_paste_selection(struct work_struct *work) ...@@ -137,7 +137,7 @@ static void __speakup_paste_selection(struct work_struct *work)
struct speakup_paste_work *spw = struct speakup_paste_work *spw =
container_of(work, struct speakup_paste_work, work); container_of(work, struct speakup_paste_work, work);
struct tty_struct *tty = xchg(&spw->tty, NULL); struct tty_struct *tty = xchg(&spw->tty, NULL);
struct vc_data *vc = (struct vc_data *) tty->driver_data; struct vc_data *vc = (struct vc_data *)tty->driver_data;
int pasted = 0, count; int pasted = 0, count;
struct tty_ldisc *ld; struct tty_ldisc *ld;
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
......
...@@ -99,7 +99,7 @@ static irqreturn_t synth_readbuf_handler(int irq, void *dev_id) ...@@ -99,7 +99,7 @@ static irqreturn_t synth_readbuf_handler(int irq, void *dev_id)
while (inb_p(speakup_info.port_tts + UART_LSR) & UART_LSR_DR) { 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); synth->read_buff_add((u_char)c);
} }
spin_unlock_irqrestore(&speakup_info.spinlock, flags); spin_unlock_irqrestore(&speakup_info.spinlock, flags);
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -113,7 +113,7 @@ static void start_serial_interrupt(int irq) ...@@ -113,7 +113,7 @@ static void start_serial_interrupt(int irq)
return; return;
rv = request_irq(irq, synth_readbuf_handler, IRQF_SHARED, rv = request_irq(irq, synth_readbuf_handler, IRQF_SHARED,
"serial", (void *) synth_readbuf_handler); "serial", (void *)synth_readbuf_handler);
if (rv) if (rv)
pr_err("Unable to request Speakup serial I R Q\n"); pr_err("Unable to request Speakup serial I R Q\n");
...@@ -141,7 +141,7 @@ void spk_stop_serial_interrupt(void) ...@@ -141,7 +141,7 @@ void spk_stop_serial_interrupt(void)
/* Turn off interrupts */ /* Turn off interrupts */
outb(0, speakup_info.port_tts+UART_IER); outb(0, speakup_info.port_tts+UART_IER);
/* Free IRQ */ /* Free IRQ */
free_irq(serstate->irq, (void *) synth_readbuf_handler); free_irq(serstate->irq, (void *)synth_readbuf_handler);
} }
int spk_wait_for_xmitr(void) int spk_wait_for_xmitr(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment