aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/varhandlers.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-03-01staging: speakup: fix line over 80 characters.Bhagyashri Dighole1-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>
2019-02-26staging: speakup: Note that simple_strtoul can't simply be replaced by kstrtoulSamuel Thibault1-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>
2018-07-11staging: speakup: remove redundant variable lColin Ian King1-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>
2018-05-06staging: speakup: Add pause command used on switching to graphical modeSamuel Thibault1-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>
2018-01-15staging: speakup: add SPDX identifier.Greg Kroah-Hartman1-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>
2017-03-23staging: speakup: fixes braces {} should be used on all arms of this statementArushi Singhal1-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>
2017-03-23staging: speakup: Simplify "NULL" comparisonsArushi Singhal1-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>
2016-11-21staging: speakup: varhandlers.c Align parenthesisWalt Feasel1-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>
2016-11-21staging: speakup: varhandlers.c Comment style modificationsWalt Feasel1-1/+2
Make modifications to comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22Staging: speakup: varhandlers: Add space around the operator.Sandhya Bankar1-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>
2016-01-28Staging: speakup: varhandlers: cleanup of function spk_get_punc_varSaurabh Sengar1-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>
2015-10-16staging: speakup: varhandlers: Remove useless intialisationAmitoj Kaur Chawla1-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>
2015-09-12Staging: speakup: varhandlers.c: Remove explicit NULL comparisonShraddha Barke1-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>
2015-08-14staging: speakup: Fix warning reported by checkpatchAleksei Fedotov1-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>
2014-10-02staging: speakup: Fix missing blank line warningMelike Yurtoglu1-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>
2014-09-11staging: speakup: fix missing blank lines after declarationsDomagoj Trsan1-0/+5
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: speakup: fix redundant return in void functionsDomagoj Trsan1-1/+0
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14staging: speakup: remove unnecessary space before semicolonNandini Hanumanthagowda1-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>
2013-10-03staging: speakup: str initialization replaced with NULL where it was initialized with intShalin Mehta1-1/+1
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>
2013-05-16Staging: speakup: Fix sparse warning in varhandlers.cSachin Kamat1-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>
2013-05-13staging: speakup: cleanup spk_var_header_by_name()Dan Carpenter1-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>
2013-04-30staging: speakup: remove custom string_unescape_any_inplaceAndy Shevchenko1-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>
2013-04-09staging: speakup: fix a bug when translate octal numbersAndy Shevchenko1-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>
2013-03-29staging: speakup: use native error codesAndy Shevchenko1-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>
2013-03-29staging: speakup: reuse native kernel functionsAndy Shevchenko1-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>
2013-01-07staging: speakup: Prefix externally-visible symbolsSamuel Thibault1-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>
2010-10-19staging: speakup: varhandlers.c style fixesWilliam Hubbs1-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>
2010-10-07Staging: add speakup to the staging directoryWilliam Hubbs1-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>