Commit Graph

14 Commits

Author SHA1 Message Date
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
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
Aleksei Fedotov 13d825edd4 staging: speakup: Fix warning reported by checkpatch
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>
2015-08-14 17:38:16 -07:00
Vaishali Thakkar ae89faccc6 Staging: speakup: Use module_spk_synth
Macro module_spk_synth can be used for speakup drivers
whose init and exit paths does only module registrations.
So, here remove some boilerplate code by using
module_spk_synth.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:27:34 +01:00
Domagoj Trsan 8e69a81106 staging: speakup: fix missing blank lines after declarations
Signed-off-by: Domagoj Trsan <domagoj.trsan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:54:51 -07:00
Rusty Russell d901aaa723 drivers/staging/speakup/: avoid world-writable sysfs files.
In line with practice for module parameters, we're adding a build-time
check that sysfs files aren't world-writable.

Cc: Christopher Brannon <chris@the-brannons.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:31:22 +09:00
Rusty Russell 22c9bcad85 staging: fix up speakup kobject mode
It uses the unnecessary S_IFREG bit which broke when my
stricter-checking-for-mode patch went in.

Since we're fixing it anyway, the extra level of indirection is
confusing for readers (ROOT_W == rw-r--r-- for example).

Also, many of these are other-writable.  Is that really intended?

I'll-queue-this-patch-up-in-a-bit-by: Greg KH <greg@kroah.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-04-01 14:20:26 +10:30
Emil Goode 7c10f1cd31 staging: speakup: fix warnings by adding __user annotations
This patch fixes the following sparse warnings by adding
__user annotations.

drivers/staging/speakup/speakup_soft.c:248:34: warning:
        incorrect type in argument 1 (different address spaces)
        drivers/staging/speakup/speakup_soft.c:248:34:
        expected void [noderef] <asn:1>*dst
        drivers/staging/speakup/speakup_soft.c:248:34:
        got char *[assigned] cp
drivers/staging/speakup/speakup_soft.c:272:40: warning:
        incorrect type in argument 1 (different address spaces)
        drivers/staging/speakup/speakup_soft.c:272:40:
        expected char const [noderef] <asn:1>*s
        drivers/staging/speakup/speakup_soft.c:272:40:
        got char const *buf
drivers/staging/speakup/speakup_soft.c:306:17: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/speakup_soft.c:306:17:
        expected long ( *read )( ... )
        drivers/staging/speakup/speakup_soft.c:306:17:
        got long ( static [toplevel] *<noident> )( ... )
drivers/staging/speakup/speakup_soft.c:307:18: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/speakup_soft.c:307:18:
        expected long ( *write )( ... )
        drivers/staging/speakup/speakup_soft.c:307:18:
        got long ( static [toplevel] *<nfile_operationsoident> )( ... )

drivers/staging/speakup/devsynth.c:29:41: warning:
        incorrect type in argument 2 (different address spaces)
        drivers/staging/speakup/devsynth.c:29:41:
        expected void const [noderef] <asn:1>*from
        drivers/staging/speakup/devsynth.c:29:41:    got char const *ptr
drivers/staging/speakup/devsynth.c:62:17: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/devsynth.c:62:17:
        expected long ( *read )( ... )
        drivers/staging/speakup/devsynth.c:62:17:
        got long ( static [toplevel] *<noident> )( ... )
drivers/staging/speakup/devsynth.c:63:18: warning:
        incorrect type in initializer (incompatible argument 2
        (different address spaces))
        drivers/staging/speakup/devsynth.c:63:18:
        expected long ( *write )( ... )
        drivers/staging/speakup/devsynth.c:63:18:
        got long ( static [toplevel] *<noident> )( ... )

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22 15:35:52 -07:00
William Hubbs 89c9df1b79 staging: speakup: soft: remove custom locking macros
Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:14:48 -07:00
Ben Hutchings 40fe4f8967 staging: speakup_soft: Fix reading of init string
softsynth_read() reads a character at a time from the init string;
when it finds the null terminator it sets the initialized flag but
then repeats the last character.

Additionally, if the read() buffer is not big enough for the init
string, the next read() will start reading from the beginning again.
So the caller may never progress to reading anything else.

Replace the simple initialized flag with the current position in
the init string, carried over between calls.  Switch to reading
real data once this reaches the null terminator.

(This assumes that the length of the init string can't change, which
seems to be the case.  Really, the string and position belong together
in a per-file private struct.)

Tested-by: Samuel Thibault <sthibault@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 05:32:50 -07:00
Samuel Thibault cfd7570106 speakup: lower default software speech rate
Speech synthesis beginners need a low speech rate, and trained people
want a high speech rate.  A medium speech rate is thus actually not a
good default for neither.  Since trained people will typically know how
to change the rate, better default for a low speech rate, which
beginners can grasp and learn how to increase it afterwards

This was agreed with users on the speakup mailing list.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:03:40 -07:00
Peter Huewe 6263ba5519 staging: speakup: Use kstrtoul_from_user
This patch replaces the code for getting an unsigned long from a
userspace buffer by a simple call to kstroul_from_user.
This makes it easier to read and less error prone.

Kernel Version: staging of 20110606

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-28 14:35:41 -07:00
Christopher Brannon 13f1a041ac staging: speakup: speakup_soft.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Make the file_operations structure const.
* Use strict_strtoul instead of simple_strtoul.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:37 -07:00
William Hubbs c6e3fd22cd Staging: add speakup to the staging directory
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>
2010-10-07 19:22:31 -07:00