summaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/varhandlers.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: speakup: fix line over 80 characters.Bhagyashri Dighole2019-03-011-1/+2
| | | | | | | | 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>
* staging: speakup: Note that simple_strtoul can't simply be replaced by kstrtoulSamuel Thibault2019-02-261-0/+1
| | | | | | | | We often receive patches which erroneously try to use kstrtoul in these places. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: remove redundant variable lColin Ian King2018-07-111-3/+2
| | | | | | | | | | | Variable l is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'l' set but not used [-Wunused-but-set-variable Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: Add pause command used on switching to graphical modeSamuel Thibault2018-05-061-0/+1
| | | | | | | | | | For software speech syntheses to be able to manage concurrent audio card access, they need to know when speakup stops emitting text to be spoken because the console has switched to graphical mode. This introduces a PAUSE command to do so. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: add SPDX identifier.Greg Kroah-Hartman2018-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the remaining staging speakup files to have a proper SPDX identifier, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@reisers.ca> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: fixes braces {} should be used on all arms of this statementArushi Singhal2017-03-231-5/+7
| | | | | | | | This patch fixes the checks reported by checkpatch.pl for braces {} should be used on all arms of this statement. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: Simplify "NULL" comparisonsArushi Singhal2017-03-231-3/+3
| | | | | | | | | Fixed coding style for null comparisons in speakup driver to be more consistant with the rest of the kernel coding style. Replaced 'x != NULL' with 'x' and 'x = NULL' with '!x'. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: varhandlers.c Align parenthesisWalt Feasel2016-11-211-2/+1
| | | | | | | | Make suggested checkpatch modification for CHECK: Alignment should match open parenthesis Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: varhandlers.c Comment style modificationsWalt Feasel2016-11-211-1/+2
| | | | | | | Make modifications to comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: speakup: varhandlers: Add space around the operator.Sandhya Bankar2016-09-221-3/+3
| | | | | | | This patch was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: speakup: varhandlers: cleanup of function spk_get_punc_varSaurabh Sengar2016-01-281-25/+25
| | | | | | | | | | | | | This patch does the following: * changed the complicated if statements to simple case statements * in case of E_DEFAULT, no need to return error as ERESTART, because this is the user asked for. Hence function should return success. * ret variable is 0 always, hence removed it. * removed one ternary operator, as it was always returning the status value only, and hence removed the status variable too Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: varhandlers: Remove useless intialisationAmitoj Kaur Chawla2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: speakup: varhandlers.c: Remove explicit NULL comparisonShraddha Barke2015-09-121-9/+9
| | | | | | | | | | | | | | | Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: Fix warning reported by checkpatchAleksei Fedotov2015-08-141-1/+2
| | | | | | | | | This patch fixes the checkpatch.pl warnings: WARNING: Block comments use a trailing */ on a separate line WARNING: Block comments use * on subsequent lines Signed-off-by: Aleksey Fedotov <lexa@cfotr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: Fix missing blank line warningMelike Yurtoglu2014-10-021-0/+1
| | | | | | | | Fixes "Missing a blank line after declarations" checkpatch.pl warning in varhandlers.c Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: fix missing blank lines after declarationsDomagoj Trsan2014-09-111-0/+5
| | | | | Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: fix redundant return in void functionsDomagoj Trsan2014-09-111-1/+0
| | | | | Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: remove unnecessary space before semicolonNandini Hanumanthagowda2013-10-141-3/+3
| | | | | | | | Removed unnecessary space before semicolon which was leading to checkpatch.pl warning. Signed-off-by: Nandini Hanumanthagowda <nandu.hgowda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: str initialization replaced with NULL where it was ↵Shalin Mehta2013-10-031-1/+1
| | | | | | | | | initialized with int Fixed warnings in all of three files where the string was initilized with an integer instead of NULL Signed-off-by: Shalin Mehta <shalinmehta85@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: speakup: Fix sparse warning in varhandlers.cSachin Kamat2013-05-161-1/+1
| | | | | | | | | | | 'cp' is a pointer. Fix the incorrect comparison with integer to avoid the below warning: drivers/staging/speakup/varhandlers.c:283:19: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: cleanup spk_var_header_by_name()Dan Carpenter2013-05-131-10/+7
| | | | | | | | | | There is a confusing while loop here and I have re-written it in canonical for loop format. Also I reversed the NULL check on "name" and pulled everything in one tab stop. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: remove custom string_unescape_any_inplaceAndy Shevchenko2013-04-301-46/+0
| | | | | | | | | | | | | There is generic implementation of the function to unescape strings. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@braille.uwo.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* staging: speakup: fix a bug when translate octal numbersAndy Shevchenko2013-04-091-2/+2
| | | | | | | | | There are actually overflow bug and typo. And bug was never happened due to the typo. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: use native error codesAndy Shevchenko2013-03-291-13/+13
| | | | | | | | | | | | | | | The mapping as follows: E_RANGE -> ERANGE E_UNDEF -> ENODATA E_TOOLONG -> E2BIG SET_DEFAULT -> ERESTART As a side effect it fixes a bug in spk_var_store() where return code was mistakenly compared to negative value instead of positive. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: reuse native kernel functionsAndy Shevchenko2013-03-291-29/+1
| | | | | | | | | We have simple_strtoul and simple_strtol. Don't repeat their functionality here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: Prefix externally-visible symbolsSamuel Thibault2013-01-071-33/+33
| | | | | | | This prefixes all externally-visible symbols of speakup with "spk_". Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: speakup: varhandlers.c style fixesWilliam Hubbs2010-10-191-54/+55
| | | | | | | fix issues reported by checkpatch.pl Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: add speakup to the staging directoryWilliam Hubbs2010-10-071-0/+403
Speakup is a kernel based screen review package for the linux operating system. It allows blind users to interact with applications on the linux console by means of synthetic speech. The authors and maintainers of this code include the following: Kirk Reiser, Andy Berdan, John Covici, Brian and David Borowski, Christopher Brannon, Samuel Thibault and William Hubbs. Signed-off-by: William Hubbs <w.d.hubbs@gmail.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>