Commit graph

333 commits

Author SHA1 Message Date
Samuel Thibault
c188966067 speakup: make get_char actually get unicode characters
9831013cbd ('speakup: convert screen
reading to 16bit characters') paved the way for handling unicode
characters in speakup, but for the review mode, it missed actually
getting unicode characters from the VC. This fixes by just turning the
use_unicode parameter to 1.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Zahari Yurukov <zahari.yurukov@gmail.com>
Reviewed-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14 06:07:43 +08:00
Arushi Singhal
533131df8a staging: speakup: fix "Alignment match open parenthesis"
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14 06:07:43 +08:00
Narcisa Ana Maria Vasile
38081c7185 staging: speakup: i18n.c: Refactor conditionals in spk_msg_set
Reduce the indentation level in spk_msg_set and remove
unnecessary return variable.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12 15:27:45 +01:00
Narcisa Ana Maria Vasile
eaeab71f27 staging: speakup: i18n.c: Change return type from int to bool
The possible return values (0 or 1) for compare_specifiers
and fmt_validate represent whether a condition holds or not, so
conceptually, they are booleans.

Update documentation for these two functions.

Change type of variable 'still_comparing' from int to bool too,
inside fmt_validate, because it is intended to hold truth values
as well.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12 15:27:45 +01:00
Samuel Thibault
425e586cf9 speakup: add unicode variant of /dev/softsynth
This adds /dev/softsynthu, along /dev/softsynth, which emits output in
UTF-8 encoding, thus allowing to support 16bit characters.  Most of the
code is shared, only the read function has to behave differently in
latin1 and in unicode mode.  Since Linux only supports 16bit characters,
we can just hardcode the UTF-8 encoding.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 17:29:14 +01:00
Samuel Thibault
9831013cbd speakup: convert screen reading to 16bit characters
This adds 16bit character support to most of the screen reading by
extending characters to u16 throughout the code.

Non-latin1 characters are assumed to be alphabetic type for now.

non-latin1 vt_notifier_call-provided characters are not ignored any
more, and the 16bit character returned by get_char is not truncated any
more. For simplicity, speak_char still only supports latin1 characters.
Its direct mode however does support 16bit characters, so in practice
this will not be a limitation, non-latin1 languages will be handled by
the synthesizer. spelling words does not support direct mode yet, for
simplicity for now it will ignore 16bit characters.

For simplicity again, speakup messages are left in latin1 for now.

Some coding style is fixed along the way.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 17:29:14 +01:00
Samuel Thibault
89fc2ae80b speakup: extend synth buffer to 16bit unicode characters
This extends the synth buffer slots to 16bit, so as to hold 16bit
unicode characters.

synth_buffer_getc and synth_buffer_peek now return 16bit characters.
Speech synthesizers which do not support characters beyond latin1 can
use the synth_buffer_skip_nonlatin1() helper to skip the non-latin1
characters before getting or peeking. All synthesizers are made to use
it for now.

This makes synth_buffer_add take a 16bit character. For simplicity for
now, synth_printf is left to using latin1 formats and strings.
synth_putwc, synth_putwc_s, synth_putws and synth_putws_s helpers are
however added to put 16bit characters and strings.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 17:28:20 +01:00
Tamara Diaconita
c9862fe6dd staging: speakup: kobjects: Delete comparison
Comparison to NULL is not necessary because 'if' statement tests if
'synth' is NULL anyway.

Delete comparison in 'if' structure to fix the checkpath.pl issue :
CHECK: Comparison to NULL could be written 'synth'.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:29:40 +01:00
Tamara Diaconita
6f7c59a8c7 staging: speakup: kobjects: Rearrange headers
Put a part from the headers of some functions in a new line to have less than
80 characters.

Fixed the checkpath.pl issue:
CHECK: line over 80 characters.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:29:40 +01:00
Tamara Diaconita
c9219a55f0 staging: speakup: kobjects: Align the code
Fixed the checkpath.pl issue:
CHECK: Aligment should match open paranthesis.

Added and deleted spaces and tabs to align the code.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:29:40 +01:00
Tamara Diaconita
51c3d03470 staging: speakup: kobjects: Delete blank line
Delet the blank line after an open brace '{' to fix the checkpath.pl issue:
CHECK: Blank lines aren't necessary after an open brace '{'.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:29:40 +01:00
Tamara Diaconita
b10ef8aae9 staging: speakup: kobjects: Delete space
Added a space after multiple casts to fix the checkpath.pl issue:
CHECK: No space is necessary after a cast.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:28:21 +01:00
simran singhal
4be4c37929 staging: speakup: Clean up tests if NULL returned on failure
Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:27:13 +01:00
Tamara Diaconita
1839f03706 staging:speakup:i18n.c: Align open paranthesis
Fixed the following checkpath.pl issue:
CHECK: alignment should match open paranthesis.

Deleted a tab and added spaces to align open paranthesis.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:27:13 +01:00
Tuomo Rinne
8c7049eb50 staging: speakup: Fixed coding style errors and aligned indents
Fixed indentation to use tabs and aligned all the fields to same level.

Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:27:13 +01:00
Joe Perches
ae8784fcdc staging: speakup: Add __printf format/arg verification, fix fallout
Using __printf allows the compiler to verify formats and arguments.
Use it and fix the single misuse found.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:25:57 +01:00
Arushi Singhal
d5dc063ca2 staging: speakup:indentation should use tabs
Indentation should always use tabs and never spaces.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:25:57 +01:00
Sreya Mittal
2430125c1f staging: speakup: Clean up if conditions
Found by checkpatch.pl
Logical conditions are on the next line, useless parentheses present
Clean up the if tests by

* Put logical conditions on the previous line
* Line up the tests

Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:39:54 +01:00
Sreya Mittal
4cb3150a8c staging: speakup: Align with parentheses
Align next line of print statements
to the right of open parentheses.

Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:39:54 +01:00
Varsha Rao
d351c2db54 staging: speakup: Replace BUG_ON() with WARN_ON().
BUG_ON() is replaced with WARN_ON() and EINVAL is returned, when
WARN_ON() is true. This fixes the following checkpatch issue:

Avoid crashing the kernel - try using WARN_ON & recovery code rather
than BUG() or BUG_ON().

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:05 +01:00
Sreya Mittal
06f6c8d401 staging: speakup: Clean up if tests
Put logical continuations on the next line;
remove useless parentheses;
and line up the tests.

Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:02 +01:00
sayli karnik
58b0de1cc0 staging: speakup: i18n: Add spaces around operators
The patch adds spaces around binary operators as suggested by
checkpatch.pl

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:02 +01:00
sayli karnik
75e6b00f72 staging: speakup: i18n: Replace 'x!=NULL' with 'x'
The patch removes the explicit NULL comparison by replacing 'x!=NULL'
with 'x'. This issue was found by checkpatch.pl

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:02 +01:00
Varsha Rao
e3bab5eb1a staging: speakup: Added spaces around arithmetic operators.
Added spaces around arithmetic operators (+, -, /), to fix the checkpatch
issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:02 +01:00
Varsha Rao
8190e15c40 staging: speakup: Removed blank line after open braces.
Remove blank line after open braces, to fix the following checkpatch issue:

CHECK: Blank lines aren't necessary after an open brace '{'

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:02 +01:00
Olav Haugan
904cf12dd3 staging: speakup: (coding style) Limit line to 80 chars
Fix checkpatch warning about line being over 80 characters.

Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:02 +01:00
Olav Haugan
2ffb795f4c staging: speakup: (coding style) Simplify comparisons to NULL
Fix checkpatch check notices by simplifying comparisons to NULL.

Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:01 +01:00
Ingo Molnar
174cd4b1e5 sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>
Fix up affected files that include this signal functionality via sched.h.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:32 +01:00
Arushi Singhal
4d0bdcb10c staging: rtl8192e: Aligning the * on each line in block comments
This patch fixes the issue by aligning the * on each line in block
comments.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12 13:46:57 +01:00
Derek Robson
fb837d6761 Staging: speakup: speakup.h - remove unused define
As part of cleaning up symbolic permissions found define that is not used.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09 13:10:20 +01:00
Derek Robson
cb23ebdfa6 Drivers: staging: speakup: spk_priv.h - style fix
Changed function definition argument to have identifier name.
found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05 13:05:16 +01:00
Vitali Liaukovich
d9c3b5a764 Staging: speakup: speakup_bns: fix comment
Fixed comment formatting issue.

Signed-off-by: Vitali Liaukovich <vitali.liaukovich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-31 09:30:58 +01:00
Derek Robson
73c3700e86 Staging: speakup - syle fix permissions to octal
A style fix across whole driver.
changed permissions to octal style, found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-31 09:30:58 +01:00
Derek Robson
f4535f4eae Staging: speakup: style fix, octal file permissions
Changed file permission to octal style,
Can't use __ATTR_RW() as the handler is in standard format.
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10 17:37:25 +01:00
Walt Feasel
469554a148 staging: speakup: speakup_soft.c Align parenthesis
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-23 10:07:32 +01:00
Walt Feasel
866352a891 staging: speakup: speakup_soft.c comment modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:07:32 +01:00
Walt Feasel
b61f49a6e5 staging: speakup: speakup_soft.c Blank line after {
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary after an
open brace '{'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:07:32 +01:00
Walt Feasel
a46063f386 staging: speakup: speakup_soft.c Multiple blank lines
Make suggested checkpatch modification for
CHECK: Please don't use multiple blank lines

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:07:32 +01:00
Walt Feasel
59cb14b2b9 staging: speakup: speakup_soft.c Logical continuation
Make suggested checkpatch modification for
CHECK: Logical continuations should be on the
previous line

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:07:32 +01:00
Walt Feasel
5dde604ecd staging: speakup: speakup_soft.c Space around operator
Make suggested checkpatch modification for
CHECK: spaces preferred around that '|'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:07:32 +01:00
Walt Feasel
33b04a45af staging: speakup: speakup_spkout.c Space around operator
Make suggested checkpatch modification for
CHECK: spaces preferred around that '|'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:05:39 +01:00
Walt Feasel
5007aa0528 staging: speakup: speakup_spkout.c comment modifications
Make modifications to comments

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:05:39 +01:00
Walt Feasel
d002894507 staging: speakup: speakup_txprt.c Spaces preferred around operator
Make suggested checkpatch modification for
CHECK: spaces preferred around that '|'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:05:39 +01:00
Walt Feasel
a953dd7607 staging: speakup: speakup_txprt.c Comment modifications
Make modifications to comments

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:05:39 +01:00
Walt Feasel
3e8855743a staging: speakup: spk_priv_keyinfo.h Space around operator
Make suggested checkpatch modification for
CHECK: spaces preferred around that '+'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:05:39 +01:00
Walt Feasel
1ce8eeb18f staging: speakup: spk_priv_keyinfo.h align columns
Make modifications to align columns

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:05:39 +01:00
Walt Feasel
253f5fbf67 staging: speakup: spk_types.h Align parenthesis
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-23 10:05:39 +01:00
Walt Feasel
958cb7d4a6 staging: speakup: spk_types.h Comment modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-23 10:05:39 +01:00
Walt Feasel
020f95cb51 staging: speakup: synth.c Align parenthesis
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-21 11:05:30 +01:00
Walt Feasel
d2ad9a8255 staging: speakup: synth.c Comment modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
eaf40ad456 staging: speakup: synth.c Logical continuation
Make suggested checkpatch modification for
CHECK: Logical continuations should be on the
previous line

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
99f01137b7 staging: speakup: synth.c Blank line before }
Make suggested checkpatch modification for
CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
c67095cec5 staging: speakup: synth.c Spaces around operators
Make suggested checkpatch modification for
CHECK: spaces preferred around that '|,+,-,/'

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:30 +01:00
Walt Feasel
dd451964f3 staging: speakup: thread.c align on parenthesis
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-21 11:05:29 +01:00
Walt Feasel
b42fe0bc14 staging: speakup: thread.c Comment modifications
Make comment style modifications

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Walt Feasel
44c8e49b35 staging: speakup: TODO Correct email
Make email correction for kirk@reisers.ca

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Acked-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Walt Feasel
9eca657fff staging: speakup: varhandlers.c Align parenthesis
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-21 11:05:29 +01:00
Walt Feasel
26ce8a4fce staging: speakup: varhandlers.c Comment style modifications
Make modifications to comment style

Signed-off-by: Walt Feasel <waltfeasel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21 11:05:29 +01:00
Shiva Kerdel
d290effe7e 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: Shiva Kerdel <shiva@exdev.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:50:35 +01:00
Bhumika Goyal
c4610f6e1d Staging: speakup: constify attribute_group structures
Check for attribute_group structures that are only passed as a second
argument to the functions sysfs_remove_group and sysfs_create_group. As
these arguments are constant so, attribute_group structures having this
property  can also be made constant.
Done using coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct attribute_group i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
(
sysfs_remove_group(e1,&i@p)
|
sysfs_create_group(e1,&i@p)
)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct attribute_group i={...};

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct attribute_group i;

File size before:
   text	   data	    bss	    dec	    hex	filename
   7551	   1440	     16	   9007	   232f
drivers/staging/speakup/kobjects.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   7671	   1312	     16	   8999	   2327
drivers/staging/speakup/kobjects.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:14:03 +02:00
Sandhya Bankar
a04c28d079 Staging: speakup: kobjects: Add space around the operator.
This issue was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 12:01:14 +02:00
Sandhya Bankar
114c9ec2fd Staging: speakup: varhandlers: Add space around the operator.
This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:56:54 +02:00
Katie Dunne
3adc4aae0e staging: speakup: Remove unnecessary parentheses
Issue found by checkpatch.

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22 11:54:47 +02:00
Pavel Andrianov
777953182e speakup: Add spinlock in synth_direct_store
All operations with synth buffer should be protected,
as there are global pointers, which should be modified atomically.

Found by Linux Driver Verification project (linuxtesting.org)

Signed-off-by: Pavel Andrianov <andrianov@ispras.ru>
Acked-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 13:13:25 +02:00
Colin Ian King
99a9ffacc1 staging: speakup: ensure we do not overrun synths array
synth_add allows one to add MAXSYNTHS synths to the synths array;
however it always NULLifies the next synth in the array which
means that on the MAXSYNTHS synth we get an out-of-bounds write of
the NULL to the synths array.  Make the synths array MAXSYNTHS + 1
elements in size to allow for the final NULL sentinal to avoid the
out-of-bounds write.

Issue found wit CoverityScan, CID#744671

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:14:54 +02:00
Laurence Rochfort
b6ed5a233a Staging: speakup: Remove space after cast
Fix the checkpatch.pl warning "No space is necessary after a cast".

Signed-off-by: Laurence Rochfort <laurence.rochfort@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-15 19:14:53 +02:00
Linus Torvalds
2f37dd131c Staging and IIO driver update for 4.7-rc1
Here's the big staging and iio driver update for 4.7-rc1.
 
 I think we almost broke even with this release, only adding a few more
 lines than we removed, which isn't bad overall given that there's a
 bunch of new iio drivers added.  The Lustre developers seem to have
 woken up from their sleep and have been doing a great job in cleaning up
 the code and pruning unused or old cruft, the filesystem is almost
 readable :)
 
 Other than that, just a lot of basic coding style cleanups in the churn.
 All have been in linux-next for a while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlc/00QACgkQMUfUDdst+ynXYQCdG9oEsw4CCItbjGfQau5YVGbd
 TOcAnA19tZz+Wcg3sLT8Zsm979dgVvDt
 =9UG/
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO driver updates from Greg KH:
 "Here's the big staging and iio driver update for 4.7-rc1.

  I think we almost broke even with this release, only adding a few more
  lines than we removed, which isn't bad overall given that there's a
  bunch of new iio drivers added.

  The Lustre developers seem to have woken up from their sleep and have
  been doing a great job in cleaning up the code and pruning unused or
  old cruft, the filesystem is almost readable :)

  Other than that, just a lot of basic coding style cleanups in the
  churn.  All have been in linux-next for a while with no reported
  issues"

* tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits)
  Staging: emxx_udc: emxx_udc: fixed coding style issue
  staging/gdm724x: fix "alignment should match open parenthesis" issues
  staging/gdm724x: Fix avoid CamelCase
  staging: unisys: rename misleading var ii with frag
  staging: unisys: visorhba: switch success handling to error handling
  staging: unisys: visorhba: main path needs to flow down the left margin
  staging: unisys: visorinput: handle_locking_key() simplifications
  staging: unisys: visorhba: fail gracefully for thread creation failures
  staging: unisys: visornic: comment restructuring and removing bad diction
  staging: unisys: fix format string %Lx to %llx for u64
  staging: unisys: remove unused struct members
  staging: unisys: visorchannel: correct variable misspelling
  staging: unisys: visorhba: replace functionlike macro with function
  staging: dgnc: Need to check for NULL of ch
  staging: dgnc: remove redundant condition check
  staging: dgnc: fix 'line over 80 characters'
  staging: dgnc: clean up the dgnc_get_modem_info()
  staging: lustre: lnet: enable configuration per NI interface
  staging: lustre: o2iblnd: properly set ibr_why
  staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini
  ...
2016-05-20 22:20:48 -07:00
Peter Hurley
97ef38b821 tty: Replace TTY_THROTTLED bit tests with tty_throttled()
Abstract TTY_THROTTLED bit tests with tty_throttled().

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-30 09:26:55 -07:00
Okash Khawaja
ff59f2a6d4 staging: speakup: fix type mismatch warnings
Compiling speakup driver with sparse produces following warning:

drivers/staging/speakup/serialio.c:22:9: warning: incorrect type in
initializer (different base types)
drivers/staging/speakup/serialio.c:22:9:    expected unsigned int
[unsigned] flags
drivers/staging/speakup/serialio.c:22:9:    got restricted upf_t

This patch fixes it.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Samuel Thibault
779bee40b9 Staging: speakup: Clear hi font bit from attributes
Previously, speakup would see the hi-font bit in attributes.
Since this bit has nothing to do with attributes, we need to clear it.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Amitoj Kaur Chawla
c943e13bd2 staging: speakup: Replace del_timer with del_timer_sync
Use del_timer_sync to ensure timer is stopped on all CPUs before
the driver exists and the timer should not run when the module is
being removed. Since the timer is not called from an interrupt
context, this change is safe and will not cause deadlock.

The Coccinelle semantic patch used to make this change is as
follows:
// <smpl>
@r@
declarer name module_exit;
identifier ex;
@@

module_exit(ex);

@@
identifier r.ex;
@@

ex(...) {
  <...
- del_timer
+ del_timer_sync
    (...)
  ...>
}
// </smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Amitoj Kaur Chawla
d6e29ca1f6 staging: speakup: Remove unnecessary test in if condition
Remove unnecessary test on synth->alive since it has already been
tested previously.

This fixes the following smatch warning:
drivers/staging/speakup/synth.c:182 spk_synth_is_alive_restart() warn:
we tested 'synth->alive' before and it was 'false'

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-05 14:48:04 -08:00
Alison Schofield
cd95ed989a staging: speakup: remove multiple assignments
Remove multiple assignments by factorizing.

Coccinelle semantic patch used:
@@ identifier x,y; constant z; @@
- x=y=z;
+ x=z;
+ y=z;

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-05 14:48:04 -08:00
Dilek Uzulmez
e81e31fb82 Staging: speakup: Add space around '|'
Add space around operator '|'. Problem found using checkpatch.pl
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-05 14:48:04 -08:00
Janani Ravichandran
e6ceec822a staging: speakup: Fix block comment style
Use trailing */ on a separate line when it is a block comment.
This patch fixes the last of the checkpatch warnings for the file.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:49:09 -08:00
Alison Schofield
5a41b93476 staging: speakup: compress return logic into one line
Simplify function return by merging assignment and return into
one command line. Remove (now) unused local variable.

Found using Coccinelle:
@@
expression e, ret;
@@

-ret =
+return
	e;
-return ret;

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Janani Ravichandran
b3d0ea8d80 staging: speakup: Eliminate commented out code
This patch removes commented out code as it contributes to code clutter.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 20:00:30 -08:00
Bhumika Goyal
78f5d21018 Staging:speakup:add space around '|'
Fix checkpatch.pl check:CHECK: spaces preferred around that '|'.
Add spaces around operands to fix these warnings.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 19:07:38 -08:00
Greg Kroah-Hartman
5ba907a949 Merge 4.5-rc3 into staging-next
We want the upstream staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:04 -08:00
Samuel Thibault
8d9b39c649 Staging: speakup: Fix allyesconfig build on mn10300
mn10300 uses an mmio-driven uart. This is not supported by speakup, so
prevent from enabling it.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-01 13:05:44 -08:00
Greg Kroah-Hartman
4cff7adbeb Merge 4.5-rc2 into staging-next
This fixes a merge issue with the panel driver, and picks up fixes in
iio and other drivers that we want here.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-01 12:50:26 -08:00
Linus Torvalds
54e3f3e302 TTY/Serial fixes for 4.5-rc2
Here are some small tty/serial driver fixes for 4.5-rc2.
 
 They resolve a number of reported problems (the ioctl one specifically
 has been pointed out by numerous people) and one patch adds some new
 device ids for the 8250_pci driver.  All have been in linux-next
 successfully.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlauWWkACgkQMUfUDdst+ykujQCfUSpPMRs3yagM24SI8ITnbEJQ
 7H0An0utvQBUhgf10WA7trJ+uyzq4SsQ
 =uUEE
 -----END PGP SIGNATURE-----

Merge tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some small tty/serial driver fixes for 4.5-rc2.

  They resolve a number of reported problems (the ioctl one specifically
  has been pointed out by numerous people) and one patch adds some new
  device ids for the 8250_pci driver.  All have been in linux-next
  successfully"

* tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: 8250_pci: Add Intel Broadwell ports
  staging/speakup: Use tty_ldisc_ref() for paste kworker
  n_tty: Fix unsafe reference to "other" ldisc
  tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
  tty: Retry failed reopen if tty teardown in-progress
  tty: Wait interruptibly for tty lock on reopen
2016-01-31 17:09:39 -08:00
Samuel Thibault
88867e3d0b Staging: speakup: fix read scrolled-back VT
Previously, speakup would always read the non-scrolled part of the VT,
even when the VT is scrolled back with shift-page.  This patch makes
vt.c export screen_pos so that speakup can use it to properly access
the content of the scrolled-back VT.

This was tested with both vgacon and fbcon.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:55:40 -08:00
Samuel Thibault
327b882d3b Staging: speakup: Fix getting port information
Commit f79b0d9c22 ("staging: speakup: Fixed warning <linux/serial.h>
instead of <asm/serial.h>") broke the port information in the speakup
driver: SERIAL_PORT_DFNS only gets defined if asm/serial.h is included,
and no other header includes asm/serial.h.

We here make sure serialio.c does get the arch-specific definition of
SERIAL_PORT_DFNS from asm/serial.h, if any.

Along the way, this makes sure that we do have information for the
requested serial port number (index)

Fixes: f79b0d9c22 ("staging: speakup: Fixed warning <linux/serial.h> instead of <asm/serial.h>")
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: stable <stable@vger.kernel.org> # 3.18
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:55:40 -08:00
Shraddha Barke
5cb10d42de Staging: speakup: Remove FSF mailing address
FSF mailing address is no longer required to be specified. Hence
removed.
Detected using checkpatch

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Jeff Becker
911b04d61d STAGING/SPEAKUP: Fix "expression using sizeof bool" warnings
Fix "warning: expression using sizeof bool" messages caught by sparse.
Resending directly to SPEAKUP maintainers.

Signed-off-by: Jeff Becker <Jeffrey.C.Becker@nasa.gov>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Saurabh Sengar
d86b4a71ca Staging: speakup: varhandlers: cleanup of function spk_get_punc_var
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>
2016-01-28 22:40:31 -08:00
Christian Colic
d3da1cbaef staging: speakup: (coding style) Rewrite comparisons to NULL
Rewrite comparisons to NULL so they dont show any checkpatch errors anymore.
"vc_cons[i].d != NULL" => "vc_cons[i].d"

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Christian Colic
1fd16a3125 staging: speakup: (coding style) Add braces around all arms of if-statement
Fix checkpatch error: "braces {} should be used on all arms of this statement"
by adding the necessary braces around the "if".

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Christian Colic
a4efe6fd5d staging: speakup: (coding style) Add spaces around operands (checkpatch checks)
Fix checkpatch check: CHECK: spaces preferred around that '-' (ctx:VxV)
Add spaces around operands to fix these warnings.

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Reviewed-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-28 22:40:31 -08:00
Peter Hurley
f4f9edcf9b staging/speakup: Use tty_ldisc_ref() for paste kworker
As the function documentation for tty_ldisc_ref_wait() notes, it is
only callable from a tty file_operations routine; otherwise there
is no guarantee the ref won't be NULL.

The key difference with the VT's paste_selection() is that is an ioctl,
where __speakup_paste_selection() is completely async kworker, kicked
off from interrupt context.

Fixes: 28a821c306 ("Staging: speakup: Update __speakup_paste_selection()
       tty (ab)usage to match vt")
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-26 23:17:54 -08:00
Linus Torvalds
118c216e16 Staging driver update for 4.4-rc1
Here's the big staging driver update for 4.4-rc1.  If you were
 disappointed for 4.3-rc1 that we didn't contribute enough changesets,
 you should be happy with this pull request of over 2400 patches.
 
 But overall we removed more lines of code than we added, which is nice
 to see.  Full details in the shortlog.
 
 All of these have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlY6exwACgkQMUfUDdst+ymXiQCeNhbUB5Gv5FZtPevt25reX6wU
 IoUAn3+wAsQnwkXhOwaR+15UVJe7/7ua
 =s9E4
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big staging driver update for 4.4-rc1.  If you were
  disappointed for 4.3-rc1 that we didn't contribute enough changesets,
  you should be happy with this pull request of over 2400 patches.

  But overall we removed more lines of code than we added, which is nice
  to see.  Full details in the shortlog.

  All of these have been in linux-next for a while"

Greg, I've never been disappointed in how few commits Staging
contributes to the kernel..  Never.

* tag 'staging-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (2431 commits)
  Staging: rtl8192u: ieee80211: added missing blank lines
  Staging: rtl8192u: ieee80211: removed unnecessary braces
  Staging: rtl8192u: ieee80211: corrected block comments
  Staging: rtl8192u: ieee80211: corrected indent
  Staging: rtl8192u: ieee80211: added missing spaces after if
  Staging: rtl8192u: ieee80211: added missing space around '='
  Staging: rtl8192u: ieee80211: fixed position of else statements
  Staging: rtl8192u: ieee80211: fixed open brace positions
  staging: rdma: ipath: Remove unneeded vairable.
  staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset function
  staging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset function
  staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.c
  staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two parts
  staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesis
  staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.c
  staging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in hal/bb_cfg.c
  staging: rtl8188eu: operator = replaced by += in loop increment
  staging: rtl8188eu: occurrence of the 5 GHz code marked
  staging: rtl8188eu: increment placed into for loop header
  staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ie
  ...
2015-11-04 21:40:53 -08:00
Burcin Akalin
a16d77fc05 staging: speakup: Remove multiple assignments
Remove multiple assignments by factorizing them.Problem found using
checkpatch.pl
CHECK: multiple assignments should be avoided

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:44:30 -07:00
Ingo Molnar
a1a2ab2ff7 Linux 4.3-rc6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWJCaDAAoJEHm+PkMAQRiGvJQH/jGlxawu+mnNFjIRXmk8Zucq
 cxDVTPnQ4S1DJMyRSQTqe6ccDgDM/TEISJPZ0Gwc2SQLda27zdQiz05upbqHSPSH
 /FUHMKiMRhhIBOzdfEGR4Ry2YZID+DlG5EWCgRKf/GlgY3STZSpjIBPYd3Rl3zsU
 qragNjtbCE6eUpnLwkv40Q2mzzR3/fZxJ0drgE/QiSF8P0VmvVbrcQMF58vnUQgy
 9URp48mLhmKj+IrElSnvXMG0XLrKn1tRYXGXd3w+x1Nlr//SHYsIuQHUcp6SAVQh
 p2HXLL7eoy8rs45MCiOfXG7VgNWF6HFjVMtrNUcNfgBsLCx0qFMVrKIILrGtKh0=
 =ETze
 -----END PGP SIGNATURE-----

Merge tag 'v4.3-rc6' into locking/core, to pick up fixes before applying new changes

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-10-20 10:16:46 +02:00
Amitoj Kaur Chawla
b62c535cd0 staging: speakup: varhandlers: Remove useless intialisation
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-10-16 22:56:23 -07:00
Amitoj Kaur Chawla
b5186a9fd2 staging: speakup: speakup_audptr: Remove useless intialisation
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-10-16 22:56:23 -07:00
Cristina Moraru
7ea8778ef3 staging: speakup: Fix multi-line comment style
Thus using the preferred style for multi-line coments as
mentioned in Documentation/CodingStyle.

It also silences 'Block comments use * on subsequent lines'
and 'Block comments use a trailing */ on a separate line'
checkpatch.pl warnings.

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:56:23 -07:00
Greg Kroah-Hartman
9b22abe7b3 Merge 4.3-rc5 into staging-next
We want the fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 10:46:53 -07:00
Shraddha Barke
f60c265159 Staging: speakup: Use ARRAY_SIZE macro
ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its type or the size of its first element.

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:50:27 +01:00
covici@ccs.covici.com
b1d562acc7 staging: speakup: fix speakup-r regression
Here is a patch to make speakup-r work again.

It broke in 3.6 due to commit 4369c64c79
"Input: Send events one packet at a time)

The problem was that the fakekey.c routine to fake a down arrow no
longer functioned properly and putting the input_sync fixed it.

Fixes: 4369c64c79
Cc: stable <stable@vger.kernel.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: John Covici <covici@ccs.covici.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:57:20 +01:00