1
0
Fork 0
Commit Graph

58 Commits (050b66152f87c79e8d66aed0e7996f9336462d5f)

Author SHA1 Message Date
Rusty Russell 90ab5ee941 module_param: make bool parameters really bool (drivers & misc)
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-13 09:32:20 +10:30
Christopher Brannon 4afaee1561 Staging: speakup: Don't try to access an unallocated struct.
In speakup_init, we have the following:
	if (quiet_boot)
		spk_shut_up |= 0x01;
And in spk_types.h:
This patch moves the statement in speakup_init so that
speakup_console[vc->vc_num] is guaranteed to be allocated when it
executes.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:13:55 -08:00
Thomas Meyer 1aa5eb67d7 Staging: speakup: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:12:56 -08:00
Andrew Morton 09f9390d79 drivers/staging/speakup/devsynth.c: fix "buffer size is not provably correct" error
x86_64 allmodconfig:

In file included from arch/x86/include/asm/uaccess.h:572,
                 from include/linux/uaccess.h:5,
                 from drivers/staging/speakup/devsynth.c:4:
In function 'copy_from_user',
    inlined from 'speakup_file_write' at drivers/staging/speakup/devsynth.c:28:
arch/x86/include/asm/uaccess_64.h:64: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

I'm not sure what was unprovable about it, but size_t is the correct type
anyway.

Also replace needless min_t() with min()

Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-02 16:09:46 -07:00
Jesper Juhl 37ca936e1d Remove unneeded version.h includes from drivers/staging/speakup/
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/staging/speakup/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 10:39:38 -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
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Ilia Mirkin 39dd3e5d7b staging: speakup: Remove NULL check before kfree
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:57:36 -07:00
Christopher Brannon 87be424a9a Staging: speakup: fix an out-of-bounds error.
The cur_item variable from keyhelp.c is an index into a table of
messages.  The following condition should always hold:
MSG_FUNCNAMES_START + cur_item <= MSG_FUNCNAMES_END.
The check in keyhelp.c was wrong.  It allowed cur_item to be
incremented to an out-of-bounds value.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:39:09 -08:00
Timo von Holtz 2c62c674e0 staging: speakup: enlosed macros with complex values in parenthesis
Enclosed all macros with complex values in parenthesis

Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-04 13:01:02 -08:00
Greg Kroah-Hartman 949c3676cd Staging: Merge branch 'staging-next' into 2.6.38-rc3
This was done to resolve conflicts in the following files due
to patches in Linus's tree and in the staging-next tree:
	drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
	drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-02 13:35:58 -08:00
Christopher Brannon 628f34282d staging: speakup: more fixes for init-failure handling.
We still leaked many resources when Speakup failed to initialize.
Examples of leaked resources include:
/dev/synth, keyboard or VT notifiers, and heap-allocated st_spk_t
structs.
This is fixed.

* We now use PTR_ERR to detect kthread_create failure
(thank you Dan Carpenter).

* The loop which frees members of the speakup_console array now iterates
over the whole array, not stopping at the first NULL value.  Fixes
a possible memory leak.  Safe because kfree(NULL) is a no-op.

* The order of some initializations was changed.  The safe ones, which
will never fail, are performed first.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 15:58:16 -08:00
roel kluin e7bf352fcd Staging: speakup: &&/|| confusion in silent_store()
Fix test: the branch is always taken.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 12:06:07 -08:00
Linus Torvalds 949f6711b8 Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (510 commits)
  staging: speakup: fix failure handling
  staging: usbip: remove double giveback of URB
  Staging: batman-adv: Remove batman-adv from staging
  Staging: hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize
  staging: hv: remove unneeded osd_schedule_callback
  staging: hv: convert channel_mgmt.c to not call osd_schedule_callback
  staging: hv: convert vmbus_on_msg_dpc to not call osd_schedule_callback
  staging: brcm80211: Fix WL_<type> logging macros
  Staging: IIO: DDS: AD9833 / AD9834 driver
  Staging: IIO: dds.h convenience macros
  Staging: IIO: Direct digital synthesis abi documentation
  staging: brcm80211: Convert ETHER_TYPE_802_1X to ETH_P_PAE
  staging: brcm80211: Remove unused ETHER_TYPE_<foo> #defines
  staging: brcm80211: Remove ETHER_HDR_LEN, use ETH_HLEN
  staging: brcm80211: Convert ETHER_ADDR_LEN to ETH_ALEN
  staging: brcm80211: Convert ETHER_IS<FOO> to is_<foo>_ether_addr
  staging: brcm80211: Remove unused ether_<foo> #defines and struct
  staging: brcm80211: Convert ETHER_IS_MULTI to is_multicast_ether_addr
  staging: brcm80211: Remove unused #defines ETHER_<foo>_LOCALADDR
  Staging: comedi: Fix checkpatch.pl issues in file s526.c
  ...

Fix up trivial conflict in drivers/video/udlfb.c
2011-01-10 16:04:53 -08:00
William Hubbs 7959d55679 staging: speakup: fix failure handling
fix the failure handling in kobjects and the main function so that we
release the virtual keyboard if we exit due to another failure.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-10 12:26:10 -08:00
Christoph Lameter 5309665dcc fakekey: Simplify speakup_fake_key_pressed through this_cpu_ops
The whole function can be expressed as a simple this_cpu_read() operation.
The function overhead is now likely multiple times that of the single
instruction that is executed in it.

Sedat: fixed compile failure caused by an extra ')'.

Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2010-12-17 15:07:19 +01:00
Christoph Lameter 4a6f4fe837 drivers: Replace __get_cpu_var with __this_cpu_read if not used for an address.
__get_cpu_var() can be replaced with this_cpu_read and will then use a single
read instruction with implied address calculation to access the correct per cpu
instance.

However, the address of a per cpu variable passed to __this_cpu_read() cannot be
determed (since its an implied address conversion through segment prefixes).
Therefore apply this only to uses of __get_cpu_var where the addres of the
variable is not used.

V3->V4:
	- Move one instance of this_cpu_inc_return to a later patch
	  so that this one can go in without percpu infrastructrure
	  changes.

Sedat: fixed compile failure caused by an extra ')'.

Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2010-12-17 15:07:18 +01:00
Greg Kroah-Hartman ea3398a1ae Staging: Merge 2.6.37-rc5 into staging-next
This was done to handle a number of conflicts in the batman-adv
and winbond drivers properly.  It also now allows us to fix up the sysfs
attributes properly that were not in the .37 release due to them being
only in this tree at the time.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07 10:47:56 -08:00
Greg Kroah-Hartman 8d7ee9c498 Merge branch 'master' into work 2010-11-29 10:44:22 -08:00
Arnd Bergmann 451a3c24b0 BKL: remove extraneous #include <smp_lock.h>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-17 08:59:32 -08:00
Dan Carpenter 5fb5d38fc2 Staging: speakup: free after input_unregister_device()
input_unregister_device() frees the device so the call to
input_free_device() is a double free.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:25:52 -08:00
Tracey Dent a32d4acab4 Staging: speakup: spk_types: trival coding style issue
Checkpatch.pl gives WARNING: missing space after struct definition.
This patch fixes that warning that was on line 55.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:38:40 -08:00
Vasiliy Kulikov b3495cebaa staging: speakup: fix memory leak
speakup_init() didn't free first_console if speakup_kobj_init() fails.
Also propagate speakup_kobj_init()'s return code.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:10:54 -07:00
Vasiliy Kulikov 6a56486716 staging: speakup: fix leaks of sysfs groups
speakup_kobj_init() and speakup_kobj_exit() didn't remove
i18n_attr_group and main_attr_group sysfs groups.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:10:13 -07:00
William Hubbs a1277d85dc staging: speakup: varhandlers.c style fixes
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-19 10:06:05 -07:00
William Hubbs 7025005f15 staging: speakup: thread.c style fixes
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-19 10:06:05 -07:00
William Hubbs 1e560261b7 staging: speakup: synth.c style fixes
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-19 10:06:05 -07:00
William Hubbs baf9ac9ff8 staging: speakup: serialio.c style fixes
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-19 10:06:05 -07:00
William Hubbs a1768fbbd9 staging: speakup: selection.c style fixes
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-19 10:06:05 -07:00
William Hubbs 16d355156b staging: speakup: main.c style fixes
- fix issues reported by checkpatch.pl
- run code through Lindent
- move some prototypes to speakup.h

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:04 -07:00
William Hubbs f976520bee staging: speakup: i18n.c fix long lines
A help message had to be slightly reworded, but the meaning is the same.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19 10:06:04 -07:00
Christopher Brannon 4073f1b6ab staging: speakup: speakup_dectlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace a function-like macro with an inline function.
* Remove an incorrect use of the volatile qualifier.  The
previously-volatile variable is now always protected by a spinlock.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon c3d5d98820 staging: speakup: speakup_txprt.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -07:00
Christopher Brannon 0d42cfe4c1 staging: speakup: speakup_spkout.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:38 -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
Christopher Brannon e66c3d8475 staging: speakup: speakup_ltlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Remove an unused function-like macro.

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
Christopher Brannon 75d6282d8b staging: speakup: speakup_keypc.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate the unused synth_readable macro.
* Convert function-like macros to inline functions.

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
Christopher Brannon 9d096afa06 staging: speakup: speakup_dummy.c: style fixes
* Clean this file based on reports from checkpatch.pl.

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
Christopher Brannon 2c9e0cb07f staging: speakup: speakup_dtlk.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace function-like macros with inline functions.
* Simplify some boolean expressions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 227e18d6b6 staging: speakup: speakup_decpc.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 3d4f7eaf65 staging: speakup: speakup_decext.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Replace function-like macros with inline macros.
* Eliminate a use of the ternary operator, for readability.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon 64d1e5a098 staging: speakup: speakup_bns.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon d1c07c416c staging: speakup: speakup_audptr.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:36 -07:00
Christopher Brannon f4931441ae staging: speakup: speakup_apollo.c: style fixes
* Clean this file based on reports from checkpatch.pl.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Christopher Brannon 28ba8677bc staging: speakup: speakup_acntsa.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate an unused function-like macro.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Christopher Brannon bf4a4bacb0 staging: speakup: speakup_acntpc.c: style fixes
* Clean this file based on reports from checkpatch.pl.
* Eliminate the unused synth_readable macro.
* Convert function-like macros to inline functions.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-15 12:22:35 -07:00
Randy Dunlap 0a652b9628 staging: speakup: fix printk format warning
Fix printk format warning:

drivers/staging/speakup/serialio.c:44: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: <speakup@braille.uwo.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-14 12:14:10 -07:00
William Hubbs f1c6b7fb70 staging: speakup: kobjects.c: style fixes
clean upd this file based on reports from checkpatch.pl

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:42 -07:00
William Hubbs 09adcb52a6 staging: speakup: keyhelp.c: style fixes
Clean up this file based on reports from checkpatch.pl.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:42 -07:00
William Hubbs d09d3e2cdd staging: speakup: i18n.c: style fixes
Clean up this file based on reports from checkpatch.pl.

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 10:50:41 -07:00