Peter Senna Tschudin [Tue, 20 May 2014 10:33:41 +0000 (12:33 +0200)]
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>
Gengis Dave [Thu, 22 May 2014 23:07:13 +0000 (01:07 +0200)]
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>
Peter Senna Tschudin [Tue, 20 May 2014 10:33:44 +0000 (12:33 +0200)]
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>
Benoit Taine [Mon, 19 May 2014 16:24:26 +0000 (18:24 +0200)]
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>
Julia Lawall [Mon, 19 May 2014 04:31:12 +0000 (06:31 +0200)]
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>
Masaru Nomura [Sat, 17 May 2014 01:04:10 +0000 (02:04 +0100)]
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>
Masaru Nomura [Sat, 17 May 2014 00:17:07 +0000 (01:17 +0100)]
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>
Eli Billauer [Sun, 11 May 2014 16:53:46 +0000 (19:53 +0300)]
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>
Masanari Iida [Fri, 16 May 2014 03:31:45 +0000 (12:31 +0900)]
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>
Mark Hounschell [Wed, 21 May 2014 20:17:51 +0000 (16:17 -0400)]
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>
Mark Hounschell [Wed, 21 May 2014 19:48:47 +0000 (15:48 -0400)]
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>
Mark Hounschell [Wed, 21 May 2014 19:16:02 +0000 (15:16 -0400)]
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>
Mark Hounschell [Wed, 21 May 2014 19:08:32 +0000 (15:08 -0400)]
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>
Mark Hounschell [Wed, 21 May 2014 17:02:52 +0000 (13:02 -0400)]
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>
Daeseok Youn [Mon, 19 May 2014 09:56:34 +0000 (18:56 +0900)]
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>
Vitaly Osipov [Sun, 18 May 2014 06:59:36 +0000 (16:59 +1000)]
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>
Denis Pithon [Fri, 16 May 2014 22:24:09 +0000 (00:24 +0200)]
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>
Denis Pithon [Fri, 16 May 2014 22:14:52 +0000 (00:14 +0200)]
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>
Denis Pithon [Fri, 16 May 2014 22:14:51 +0000 (00:14 +0200)]
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>
Denis Pithon [Fri, 16 May 2014 22:14:50 +0000 (00:14 +0200)]
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>
Denis Pithon [Fri, 16 May 2014 22:30:16 +0000 (00:30 +0200)]
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>
Paul Davies C [Sun, 11 May 2014 13:11:33 +0000 (18:41 +0530)]
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>
Paul Davies C [Sun, 11 May 2014 13:11:32 +0000 (18:41 +0530)]
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>
Aaro Koskinen [Sun, 11 May 2014 11:15:20 +0000 (14:15 +0300)]
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>
Aaro Koskinen [Sun, 11 May 2014 11:15:19 +0000 (14:15 +0300)]
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>
Pawel Lebioda [Wed, 14 May 2014 19:28:27 +0000 (21:28 +0200)]
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>
Pawel Lebioda [Wed, 14 May 2014 17:20:27 +0000 (19:20 +0200)]
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>
Rickard Strandqvist [Tue, 20 May 2014 21:34:25 +0000 (23:34 +0200)]
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>
Marcus Farkas [Sat, 17 May 2014 17:38:31 +0000 (19:38 +0200)]
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>
Marcus Farkas [Sat, 17 May 2014 17:38:30 +0000 (19:38 +0200)]
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>
Marcus Farkas [Sat, 17 May 2014 17:38:29 +0000 (19:38 +0200)]
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>
Christian Engelmayer [Wed, 7 May 2014 19:40:41 +0000 (21:40 +0200)]
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>
Christian Engelmayer [Wed, 7 May 2014 19:36:48 +0000 (21:36 +0200)]
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>
Raghavendra Ganiga [Sat, 10 May 2014 16:24:14 +0000 (21:54 +0530)]
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>
Peter Senna Tschudin [Tue, 20 May 2014 10:33:42 +0000 (12:33 +0200)]
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>
Julia Lawall [Mon, 19 May 2014 04:31:09 +0000 (06:31 +0200)]
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>
John Church [Wed, 7 May 2014 12:30:02 +0000 (13:30 +0100)]
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>
Rickard Strandqvist [Thu, 22 May 2014 19:58:02 +0000 (21:58 +0200)]
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>
Jes Sorensen [Mon, 19 May 2014 08:08:19 +0000 (10:08 +0200)]
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>
navin patidar [Sun, 18 May 2014 15:19:21 +0000 (20:49 +0530)]
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>
navin patidar [Sun, 18 May 2014 15:19:20 +0000 (20:49 +0530)]
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>
navin patidar [Sun, 18 May 2014 15:19:19 +0000 (20:49 +0530)]
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>
navin patidar [Sun, 18 May 2014 15:19:18 +0000 (20:49 +0530)]
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>
navin patidar [Sun, 18 May 2014 15:19:17 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function ConvertTo_dB()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:16 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_SwAntDivChkAntSwitchCallback()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:15 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused funtion odm_DynamicTxPowerNIC()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:14 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskAPADSL()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:13 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskMP()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:12 +0000 (20:49 +0530)]
staging:rtl8188eu: Remove unused function iodm_1R_CCA()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:11 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_DynamicBBPowerSavingInit()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:10 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove function odm_DynamicBBPowerSaving()
odm_DynamicBBPowerSaving() has empty defination.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:09 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function odm_DIGbyRSSI_LPS()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:08 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function rtl8188e_RF_ChangeTxPath()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:07 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused structure rf_shadow
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:32:18 +0000 (21:02 +0530)]
staging: rtl8188eu: Remove unused funtion PHY_ScanOperationBackup8188E()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:05 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused funtion phy_TxPwrIdxToDbm()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:04 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused funtion PHY_GetTxPowerLevel8188E()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:03 +0000 (20:49 +0530)]
staging:rtl8188eu: Remove unused function phy_DbmToTxPwrIdx()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:02 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function PHY_UpdateTxPowerDbm8188E()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:01 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function rtl8192c_PHY_GetHWRegOriginalValue()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:19:00 +0000 (20:49 +0530)]
staging: rtl8188eu: Remove unused function rtl8188e_PHY_ConfigRFWithParaFile()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:18:59 +0000 (20:48 +0530)]
staging:rtl8188eu:Remove funtion Hal_CustomizeByCustomerID_8188EU()
Function has empty defination.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:18:57 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove unused function _ps_close_RF()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:18:56 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove function with empty definition _ps_open_RF()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:18:55 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove function with empty definition _InitOperationMode()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Sun, 18 May 2014 15:18:54 +0000 (20:48 +0530)]
staging: rtl8188eu: Remove function with empty definition _InitBeaconMaxError().
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Sat, 17 May 2014 10:38:58 +0000 (12:38 +0200)]
staging: rtl8188eu: remove dead code in rtw_drv_init()
(status != _SUCCESS) immediately after 'status = _SUCCESS' will never evaluate
true. Thus remove the logically dead code. Detected by Coverity - CID
1077553.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Sat, 17 May 2014 10:38:57 +0000 (12:38 +0200)]
staging: rtl8188eu: fix usage of uninit scalar in rtw_drv_init()
Function rtw_drv_init() is written in a way that assumes 'status' != _SUCCESS
as long as not explicitly set. Thus initialize 'status' to FAIL, in order to
prevent undefined behaviour if going through the exit paths. Detected by
Coverity - CID
1077832.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Wed, 7 May 2014 19:39:02 +0000 (21:39 +0200)]
staging: rtl8188eu: fix potential leak in rtw_set_key()
Fix a potential leak in the error path of rtw_set_key(). In case the requested
algorithm is not supported by the driver, 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
1077716,
1077717.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Wed, 7 May 2014 19:42:27 +0000 (21:42 +0200)]
staging: rtl8188eu: fix potential leak in update_bcn_wps_ie()
Fix a potential leak in the error path of function update_bcn_wps_ie().
Move the affected input verification to the beginning of the function so
that it may return directly without leaking already allocated memory.
Detected by Coverity - CID
1077718.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Wed, 7 May 2014 19:34:37 +0000 (21:34 +0200)]
staging: rtl8188eu: fix potential leak in rtw_mp_pwrtrk()
Function rtw_mp_pwrtrk() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity -
1077715.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Wed, 7 May 2014 19:33:20 +0000 (21:33 +0200)]
staging: rtl8188eu: fix potential leak in rtw_mp_SetRFPath()
Function rtw_mp_SetRFPath() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity - CID
1077714.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Wed, 7 May 2014 19:32:30 +0000 (21:32 +0200)]
staging: rtl8188eu: fix potential leak in rtw_mp_QueryDrv()
Function rtw_mp_QueryDrv() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity - CID
1077713.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Wed, 7 May 2014 19:31:20 +0000 (21:31 +0200)]
staging: rtl8188eu: fix potential leak in rtw_wx_set_enc_ext()
Function rtw_wx_set_enc_ext() dynamically allocates a temporary buffer that
is not freed in all error paths. Use a centralized exit path and make sure
that all memory is freed correctly. Detected by Coverity - CID
1077712.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Engelmayer [Wed, 7 May 2014 19:30:23 +0000 (21:30 +0200)]
staging: rtl8188eu: fix potential leak in rtw_wx_read32()
Function rtw_wx_read32() dynamically allocates a temporary buffer that is not
freed in all error paths. Use a centralized exit path and make sure that all
memory is freed correctly. Detected by Coverity - CID
1077711.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 04:01:18 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove 'u8 fragcnt' from struct recv_frame
Remove unused variable 'u8 fragcnt'.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 04:01:17 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove 'int frame_tag' from struct recv_frame
Remove unused variable 'int frame_tag'.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 04:01:16 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove 'void *precvbuf' from struct recv_frame
Remove unused variable 'void *precvbuf'.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 04:01:15 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove unused inline function get_rx_status()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 04:01:14 +0000 (09:31 +0530)]
staging: rtl8188eu: Remove unused inline function recvframe_push()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:31 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_os_recvbuf_resource_free()
Use usb_free_urb() instead of rtw_os_recvbuf_resource_free() to free URB.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:30 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_hostapd_mlme_rx()
rtw_hostapd_mlme_rx() has empty defination, so we can remove it.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:29 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_os_recv_resource_free()
rtw_os_recv_resource_free() has empty defination, so we can remove it.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:28 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove function rtw_os_recv_resource_init()
rtw_os_recv_resource_init() has empty defination, so we can remove it.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:27 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove struct zero_bulkout_context
Remove unused struct zero_bulkout_context.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:26 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove 'spinlock_t lock' from struct recv_priv
Remove unused variable 'spinlock_t lock'.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:25 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove unused member variables of struct recv_priv
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
navin patidar [Wed, 7 May 2014 03:57:24 +0000 (09:27 +0530)]
staging: rtl8188eu: Remove 'semaphore allrxreturnevt' from struct recv_priv
Remove unused variable 'semaphore allrxreturnevt'.
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remi Pommarel [Tue, 6 May 2014 21:40:50 +0000 (23:40 +0200)]
Staging: rtl8188eu: Fixed prohibited spaces after open '('
This patch fixes all prohibited spaces after open '(' checkpatch.pl errors
for rtl8188eu.
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tuomas Tynkkynen [Thu, 8 May 2014 11:13:17 +0000 (14:13 +0300)]
staging: lirc: Fix sparse warnings
Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rickard Strandqvist [Thu, 22 May 2014 20:25:06 +0000 (22:25 +0200)]
staging: rtl8192u: r8192U_core.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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benoit Taine [Fri, 16 May 2014 12:22:41 +0000 (14:22 +0200)]
staging/rtl8192u: Put EXPORT_SYMBOL just after the exported function
Export of symbols statement must be placed right after the definition to meet
kernel coding style guidelines. This issue was reported by checkpatch.
A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):
// <smpl>
@ r @ identifier f; @@
- EXPORT_SYMBOL(f);
@@ identifier r.f; @@
f(...) { ... }
+ EXPORT_SYMBOL(f);
// </smpl>
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Senna Tschudin [Tue, 20 May 2014 10:33:48 +0000 (12:33 +0200)]
staging: vt6655: 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>
Malcolm Priestley [Wed, 21 May 2014 20:09:44 +0000 (21:09 +0100)]
staging: vt6656: dead code remove diversity code
bDiversityRegCtlON is always false.
In later vendor driver code has been commented out.
Remove diversity timers and variables.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 21 May 2014 20:09:43 +0000 (21:09 +0100)]
staging: vt6656: remove dead code tcrc.c/h
Functions are now dead and of no use.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 21 May 2014 20:09:42 +0000 (21:09 +0100)]
staging: vt6656: s_vSWencryption replace CRCdwGetCrc32Ex
Replace with ether_crc_le which gives the same result.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 21 May 2014 20:09:41 +0000 (21:09 +0100)]
staging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32
CRCdwGetCrc32 is a bitwise not of ether_crc_le.
Replace with ether_crc_le.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 21 May 2014 20:09:40 +0000 (21:09 +0100)]
staging: vt6656: iowpa.h removed dead code.
Remove dead strutures
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Wed, 21 May 2014 20:09:39 +0000 (21:09 +0100)]
staging: vt6656: iocmd.h remove dead code.
Remove dead strutures and macros.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kees Cook [Thu, 22 May 2014 18:57:16 +0000 (11:57 -0700)]
staging/rtl8821ae: avoid format string leak to thread name
This makes sure the cfg->name can never accidentally be processed as a
format string in the worker thread name.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>