From a1277d85dc15a829d97b027de6e1f049c29a9306 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 15 Oct 2010 22:13:39 -0500 Subject: [PATCH] staging: speakup: varhandlers.c style fixes fix issues reported by checkpatch.pl Signed-off-by: William Hubbs Signed-off-by: Greg Kroah-Hartman --- drivers/staging/speakup/varhandlers.c | 109 +++++++++++++------------- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c index 2d137bd84df3..ab7de9389dd6 100644 --- a/drivers/staging/speakup/varhandlers.c +++ b/drivers/staging/speakup/varhandlers.c @@ -4,58 +4,58 @@ #include "speakup.h" static struct st_var_header var_headers[] = { - { "version", VERSION, VAR_PROC, NULL, NULL }, - { "synth_name", SYNTH, VAR_PROC, NULL, NULL }, - { "keymap", KEYMAP, VAR_PROC, NULL, NULL }, - { "silent", SILENT, VAR_PROC, NULL, NULL }, - { "punc_some", PUNC_SOME, VAR_PROC, NULL, NULL }, - { "punc_most", PUNC_MOST, VAR_PROC, NULL, NULL }, - { "punc_all", PUNC_ALL, VAR_PROC, NULL, NULL }, - { "delimiters", DELIM, VAR_PROC, NULL, NULL }, - { "repeats", REPEATS, VAR_PROC, NULL, NULL }, - { "ex_num", EXNUMBER, VAR_PROC, NULL, NULL }, - { "characters", CHARS, VAR_PROC, NULL, NULL }, - { "synth_direct", SYNTH_DIRECT, VAR_PROC, NULL, NULL }, - { "caps_start", CAPS_START, VAR_STRING, str_caps_start, NULL }, - { "caps_stop", CAPS_STOP, VAR_STRING, str_caps_stop, NULL }, - { "delay_time", DELAY, VAR_TIME, NULL, NULL }, - { "trigger_time", TRIGGER, VAR_TIME, NULL, NULL }, - { "jiffy_delta", JIFFY, VAR_TIME, NULL, NULL }, - { "full_time", FULL, VAR_TIME, NULL, NULL }, - { "spell_delay", SPELL_DELAY, VAR_NUM, &spell_delay, NULL }, - { "bleeps", BLEEPS, VAR_NUM, &bleeps, NULL }, - { "attrib_bleep", ATTRIB_BLEEP, VAR_NUM, &attrib_bleep, NULL }, - { "bleep_time", BLEEP_TIME, VAR_TIME, &bleep_time, NULL }, - { "cursor_time", CURSOR_TIME, VAR_TIME, NULL, NULL }, - { "punc_level", PUNC_LEVEL, VAR_NUM, &punc_level, NULL }, - { "reading_punc", READING_PUNC, VAR_NUM, &reading_punc, NULL }, - { "say_control", SAY_CONTROL, VAR_NUM, &say_ctrl, NULL }, - { "say_word_ctl", SAY_WORD_CTL, VAR_NUM, &say_word_ctl, NULL }, - { "no_interrupt", NO_INTERRUPT, VAR_NUM, &no_intr, NULL }, - { "key_echo", KEY_ECHO, VAR_NUM, &key_echo, NULL }, - { "bell_pos", BELL_POS, VAR_NUM, &bell_pos, NULL }, - { "rate", RATE, VAR_NUM, NULL, NULL }, - { "pitch", PITCH, VAR_NUM, NULL, NULL }, - { "vol", VOL, VAR_NUM, NULL, NULL }, - { "tone", TONE, VAR_NUM, NULL, NULL }, - { "punct", PUNCT, VAR_NUM, NULL, NULL }, - { "voice", VOICE, VAR_NUM, NULL, NULL }, - { "freq", FREQUENCY, VAR_NUM, NULL, NULL }, - { "lang", LANG, VAR_NUM, NULL, NULL }, - { "chartab", CHARTAB, VAR_PROC, NULL, NULL }, - { "direct", DIRECT, VAR_NUM, NULL, NULL }, + { "version", VERSION, VAR_PROC, NULL, NULL }, + { "synth_name", SYNTH, VAR_PROC, NULL, NULL }, + { "keymap", KEYMAP, VAR_PROC, NULL, NULL }, + { "silent", SILENT, VAR_PROC, NULL, NULL }, + { "punc_some", PUNC_SOME, VAR_PROC, NULL, NULL }, + { "punc_most", PUNC_MOST, VAR_PROC, NULL, NULL }, + { "punc_all", PUNC_ALL, VAR_PROC, NULL, NULL }, + { "delimiters", DELIM, VAR_PROC, NULL, NULL }, + { "repeats", REPEATS, VAR_PROC, NULL, NULL }, + { "ex_num", EXNUMBER, VAR_PROC, NULL, NULL }, + { "characters", CHARS, VAR_PROC, NULL, NULL }, + { "synth_direct", SYNTH_DIRECT, VAR_PROC, NULL, NULL }, + { "caps_start", CAPS_START, VAR_STRING, str_caps_start, NULL }, + { "caps_stop", CAPS_STOP, VAR_STRING, str_caps_stop, NULL }, + { "delay_time", DELAY, VAR_TIME, NULL, NULL }, + { "trigger_time", TRIGGER, VAR_TIME, NULL, NULL }, + { "jiffy_delta", JIFFY, VAR_TIME, NULL, NULL }, + { "full_time", FULL, VAR_TIME, NULL, NULL }, + { "spell_delay", SPELL_DELAY, VAR_NUM, &spell_delay, NULL }, + { "bleeps", BLEEPS, VAR_NUM, &bleeps, NULL }, + { "attrib_bleep", ATTRIB_BLEEP, VAR_NUM, &attrib_bleep, NULL }, + { "bleep_time", BLEEP_TIME, VAR_TIME, &bleep_time, NULL }, + { "cursor_time", CURSOR_TIME, VAR_TIME, NULL, NULL }, + { "punc_level", PUNC_LEVEL, VAR_NUM, &punc_level, NULL }, + { "reading_punc", READING_PUNC, VAR_NUM, &reading_punc, NULL }, + { "say_control", SAY_CONTROL, VAR_NUM, &say_ctrl, NULL }, + { "say_word_ctl", SAY_WORD_CTL, VAR_NUM, &say_word_ctl, NULL }, + { "no_interrupt", NO_INTERRUPT, VAR_NUM, &no_intr, NULL }, + { "key_echo", KEY_ECHO, VAR_NUM, &key_echo, NULL }, + { "bell_pos", BELL_POS, VAR_NUM, &bell_pos, NULL }, + { "rate", RATE, VAR_NUM, NULL, NULL }, + { "pitch", PITCH, VAR_NUM, NULL, NULL }, + { "vol", VOL, VAR_NUM, NULL, NULL }, + { "tone", TONE, VAR_NUM, NULL, NULL }, + { "punct", PUNCT, VAR_NUM, NULL, NULL }, + { "voice", VOICE, VAR_NUM, NULL, NULL }, + { "freq", FREQUENCY, VAR_NUM, NULL, NULL }, + { "lang", LANG, VAR_NUM, NULL, NULL }, + { "chartab", CHARTAB, VAR_PROC, NULL, NULL }, + { "direct", DIRECT, VAR_NUM, NULL, NULL }, }; static struct st_var_header *var_ptrs[MAXVARS] = { 0, 0, 0 }; static struct punc_var_t punc_vars[] = { - { PUNC_SOME, 1 }, - { PUNC_MOST, 2 }, - { PUNC_ALL, 3 }, - { DELIM, 4 }, - { REPEATS, 5 }, - { EXNUMBER, 6 }, - { -1, -1 }, + { PUNC_SOME, 1 }, + { PUNC_MOST, 2 }, + { PUNC_ALL, 3 }, + { DELIM, 4 }, + { REPEATS, 5 }, + { EXNUMBER, 6 }, + { -1, -1 }, }; int chartab_get_value(char *keyword) @@ -154,8 +154,8 @@ struct st_var_header *var_header_by_name(const char *name) struct var_t *get_var(enum var_id_t var_id) { BUG_ON(var_id < 0 || var_id >= MAXVARS); - BUG_ON(! var_ptrs[var_id]); - return (var_ptrs[var_id]->data); + BUG_ON(!var_ptrs[var_id]); + return var_ptrs[var_id]->data; } EXPORT_SYMBOL_GPL(get_var); @@ -238,7 +238,8 @@ int set_num_var(int input, struct st_var_header *var, int how) if (!var_data->u.n.out_str) l = sprintf(cp, var_data->u.n.synth_fmt, (int)val); else - l = sprintf(cp, var_data->u.n.synth_fmt, var_data->u.n.out_str[val]); + l = sprintf(cp, + var_data->u.n.synth_fmt, var_data->u.n.out_str[val]); synth_printf("%s", cp); return ret; } @@ -252,15 +253,15 @@ int set_string_var(const char *page, struct st_var_header *var, int len) if (len > MAXVARLEN) return -E_TOOLONG; if (!len) { - if (!var_data->u.s.default_val) - return 0; + if (!var_data->u.s.default_val) + return 0; ret = SET_DEFAULT; if (!var->p_val) var->p_val = var_data->u.s.default_val; if (var->p_val != var_data->u.s.default_val) strcpy((char *)var->p_val, var_data->u.s.default_val); - } else if (var->p_val) - strcpy((char *)var->p_val, page); + } else if (var->p_val) + strcpy((char *)var->p_val, page); else return -E_TOOLONG; return ret;