Commit graph

443875 commits

Author SHA1 Message Date
Mark Hounschell 244a0341d2 staging: dgap: Change GFP_ATOMICs to GFP_KERNEL
We don't need to use GFP_ATOMIC at driver load time
so use GFP_KERNEL instead.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:40:53 +09:00
Mark Hounschell 0c24b23255 staging: dgap: Simplify get_altpin and get_useintr functions
Simplify dgap_config_get_useintr and dgap_config_get_altpin
changing the case statement to an if statement.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:40:52 +09:00
Mark Hounschell ee487100ce staging: dgap: Replace double negative conditionals
This patch replaces double negativeconditionals

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:40:52 +09:00
Mark Hounschell 174efc1fe4 staging: dgap: Remove more extra white space and tabs
Removes more extra white space and tabs

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:39:32 +09:00
Mark Hounschell 7dfa383108 staging: dgap: Remove unnecessary initialization of variables in declarations
Removes unnecessary initialization of variables in declarations

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:39:31 +09:00
Djordje Zekovic 6baf139e8b staging: usbip: use kcalloc instead of kzalloc for array allocations
The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

Signed-off-by: Djordje Zekovic <dj@zeko.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:38:34 +09:00
Eli Billauer 43339bed70 devres: Add devm_get_free_pages API
devm_get_free_pages() and devm_free_pages() are the managed counterparts
for __get_free_pages() and free_pages().

Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:19:25 +09:00
Peter Senna Tschudin 8ffca9eae6 staging: r8712u: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:17:18 +09:00
Gengis Dave 8a5e7b012d staging: gdm72xx: return values cleanup
Return values cleanup

Signed-off-by: Davide Gianforte <davide@gengisdave.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:15:21 +09:00
Peter Senna Tschudin add6452615 staging: ft1000: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:14:31 +09:00
Benoit Taine bf52695740 staging: rts5208: Use pci_device_id rather than DEFINE_PCI_DEVICE_TABLE
This patch enhances kernel style usage for the rts5208 driver.
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet
kernel coding style guidelines. This issue was reported by checkpatch.

Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:14:31 +09:00
Julia Lawall 26e2fa765c staging: rtl8192e: make return of 0 explicit
Delete unnecessary use of a local variable to immediately return 0.

A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression ret;
expression e;
position p;
@@

-ret = 0;
... when != ret = e
return
- ret
+ 0
  ;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:14:30 +09:00
Masaru Nomura 9cdf838b3a staging: dgnc: dgnc_tty: Remove a prohibited space
Remove a prohibited space before a closed parenthesis of if statement
to meet kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:12:40 +09:00
Masaru Nomura a82477c3dc staging: dgnc: dgnc_tty: Add a required space
Add a required space before an open parenthesis of if statement
to meet kernel coding style.

Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:12:40 +09:00
Eli Billauer 9267462e6c staging: xillybus: Use devm_ API on probe and remove
Suggested-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:11:48 +09:00
Masanari Iida 6d602cf17b staging: ft1000: Convert printk to dev_err in ft1000_cs.c
This patch converts printk to dev_err in ft1000_cs.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:11:48 +09:00
Mark Hounschell 6081443758 staging: dgap: replace dgap_savestring function with kstrdup
Removes dgap_savestring function to use kstrdup instead.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:10:50 +09:00
Mark Hounschell 490de248d6 staging: dgap: Remove unnecessary test on count
This patch removes an unnecessary test. We've already
tested it by the time we get here with no possiblity
of it being changed.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:10:50 +09:00
Mark Hounschell 5512d3971b staging: dgap: Remove erroneous comment
This patch removes a false comment

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:10:50 +09:00
Mark Hounschell d78acae3d1 staging: dgap: Remove dead sniff buffer code
The sniff buffer was a /proc filesystem file. This
module no longer uses /proc. This patch removes
the deaed code associated with the sniff buffer.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:10:49 +09:00
Mark Hounschell e54766c08a staging: dgap: fix smatch warn: unsigned var is never less than zero
This patch fixes a smatch warning about an unsigned
integer being tested for less than zero.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:10:49 +09:00
Daeseok Youn 9140fcd655 staging: dgap: implement error handling in dgap_tty_register()
- alloc_tty_driver() is deprecated so it is changed to
tty_alloc_driver()
- Pointers which are allocated by alloc_tty_driver() and kzalloc()
can be NULL so it need to check NULL for them.
- If one of those is failed, it need to add proper handler for
avoiding memory leak.
- If both of drivers are registered normally, and
then set TRUE to dgap_major_serial{print}_registered. If one
of drivers is failed to register, leave a default value as
FALSE.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:09:06 +09:00
Vitaly Osipov 02d9b1eb4b staging: wlan-ng: use netdev_() instead of printk()
Replaced all uses of printk() in wlan-ng with netdev_err / _warn
where a netdev exists. If a few cases where a netdev does not yet
exist, dev_ or pr_ was used.

Checkpatch complains about lines over 80 chars or split string
constants - the messages are just too long, keeping it completely
happy would make the code less readable.

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:08:16 +09:00
Denis Pithon 79f9e634cc staging/wlan-ng: log with netdev_xxx and dev_xxx
Wherever possible, replaced printk() and pr_xxx() calls with
netdev_xxx() / dev_xxx() calls; used pr_xxx() otherwise.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:06:50 +09:00
Denis Pithon 95c9668dda staging/wlan-ng: rearrange comments
Gathered together comments in front of multicast filtering block.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:22 +09:00
Denis Pithon 02b3b53a08 staging/wlan-ng: multicast address checking
Used is_multicast_ether_addr() to perform the checking.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:22 +09:00
Denis Pithon 9b3ac7a892 staging/wlan-ng: compare using ether_addr_equal_unaligned
Replaced generic memcmp() with dedicated ether_addr_equal_unaligned()
call. I did not find any clue of u16 alignment for both addresses.

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:21 +09:00
Denis Pithon ae4af9adf1 staging/wlan-ng: add prefix to function name
Renamed convert_frame_to_ether() to p80211_convert_to_ether().

Signed-off-by: Denis Pithon <denis.pithon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:05:21 +09:00
Paul Davies C e725cef3e5 staging: octeon-usb: Fix lines with more than 80 chars in octeon-hcd.c
Some lines with more than 80 characters are converted in to multiple lines.

Signed-off-by: Paul Davies C <pauldaviesc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:03:50 +09:00
Paul Davies C f510643522 staging: octeon-usb: Add blank line after all declarations in octeon-hcd.c
Add blank lines after each declarations in drivers/staging/octeon-usb/octeon-hcd.c.

Signed-off-by: Paul Davies C <pauldaviesc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:02:48 +09:00
Aaro Koskinen 20f6b82992 staging: octeon-usb: use generic prefetch
Use generic prefetch.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:01:09 +09:00
Aaro Koskinen a4570140b3 staging: octeon-usb: delete redudant prefetches
cvmx_usb_pipe fits into a cache-line so additional prefetches are not
really helping anything.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:01:08 +09:00
Pawel Lebioda 1949551393 staging: usbip: Fix bad fuction definitions in usbip
Fix bad function definitions in all files from drivers/staging/usbip directory

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:59:36 +09:00
Pawel Lebioda 3eed8c0387 Staging: usbip: missing a blank lines after declarations
Fix "Missing a blank line after declaration" style problems
for all files in drivers/staging/usbip.

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:59:36 +09:00
Rickard Strandqvist ac082bc52d staging: rtl8712: usb_intf.c: Fix for possible null pointer dereference
There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:58:22 +09:00
Marcus Farkas 265b8e5f85 staging: rtl8712: fix unnecessary line continuations
This commit fixes the following checkpatch warning:

rtl8712/rtl871x_security.c
    - 1178: WARNING: Avoid unnecessary line continuations

Signed-off-by: Marcus Farkas <marcus.farkas@finitebox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:57:15 +09:00
Marcus Farkas 0ac07ce022 staging: rtl8712: fix unnecessary parentheses
This commit fixes the following checkpatch warnings:

rtl8712/rtl871x_security.c
    - 1167: WARNING: Unnecessary parentheses - maybe == should be = ?
    - 1374: WARNING: Unnecessary parentheses - maybe == should be = ?

Signed-off-by: Marcus Farkas <marcus.farkas@finitebox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:57:15 +09:00
Marcus Farkas 4679934a72 staging: rtl8712: fix missing blank lines after declarations
This commit fixes the following checkpatch warnings:

rtl8712/rtl871x_security.c
    - 275: WARNING: Missing a blank line after declarations
    - 768: WARNING: Missing a blank line after declarations
    - 801: WARNING: Missing a blank line after declarations

Signed-off-by: Marcus Farkas <marcus.farkas@finitebox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:57:15 +09:00
Christian Engelmayer 2af9e74ae6 staging: rtl8712: fix potential leaks in r8712_set_key()
Fix potential leaks in the error paths of r8712_set_key(). In case the
algorithm specific checks fail, the function returns without enqueuing
or freeing the already allocated command and parameter structs. Use a
centralized exit path and make sure that all memory is freed correctly.
Detected by Coverity - CID 144370, 144371.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:57:14 +09:00
Christian Engelmayer 55d4f6cc4c staging: rtl8712: fix potential leak in r871x_wx_set_enc_ext()
Fix a potential leak in the error path of r871x_wx_set_enc_ext(). In case the
requested algorithm is not supported by the driver, the function returns
without freeing the already allocated 'param' struct. Move the input
verification to the beginning of the function so that the direct return is
safe. Detected by Coverity - CID 144373.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:57:14 +09:00
Raghavendra Ganiga 540958e2f5 staging: comedi: removing warnings reported by checkpatch tool on cb_pcimdas.c
This is a patch to remove warnings reported
by checkpatch tool on cb_pcimdas.c file

Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:57:14 +09:00
Peter Senna Tschudin 2b9d89dd7a staging: wlags49_h2: wl_priv: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:55:14 +09:00
Julia Lawall aac22d07bc staging: wlags49_h2: make return of 0 explicit
Delete unnecessary local variable whose value is always 0 and that hides
the fact that the result is always 0.

A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression ret;
expression e;
position p;
@@

-ret = 0;
... when != ret = e
return
- ret
+ 0
  ;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:54:55 +09:00
John Church 27ea2f167b staging : android: Fixes a coding style issue in timed_gpio.c
This patch fixes a coding style issue for a line that was over 80 characters long.

Signed-off-by: John Church <sleeveroller@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:54:55 +09:00
Rickard Strandqvist 89b90c684e staging: rtl8188eu: os_dep: usb_intf.c: Fix to remove null pointer checks that could never happen
Removal of null pointer checks that could never happen

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:50:54 +09:00
Jes Sorensen d6c455ac1e staging: rtl8188eu: Do not byteswap half initialized variable
Copying 16 bits into an uninitialized 32 bit stack variable and then
byteswapping it can provide 'interesting' results.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:50:54 +09:00
navin patidar b5e1e9126a staging: rtl8188eu:Remove function with empty defination odm_DynamicPrimaryCCA()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:58 +09:00
navin patidar fce87279a0 staging: rtl8188eu: Remove unused function ODM_DynamicPrimaryCCA_DupRTS()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:57 +09:00
navin patidar 5aac98ab1e staging: rtl8188eu: Remove unused function DM_DIG_LowerBound_88E()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:57 +09:00
navin patidar 2c4c9a514a staging: rtl8188eu: Remove function with empty defination ODM_CheckPowerStatus()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:57 +09:00