Daeseok Youn [Wed, 19 Mar 2014 23:20:51 +0000 (08:20 +0900)]
staging: unisys: replace kzalloc/kfree with UISMALLOC/UISFREE
It doesn't need to trace status of buffer when buffers are
allocated/deallocated. So stuff of tracing memory status
are removed. And also UISMALLOC/UISFREE macro are removed
completetly. just use kzalloc/kfree.
Aaro Koskinen [Wed, 19 Mar 2014 22:52:08 +0000 (00:52 +0200)]
staging: octeon-usb: prevent memory corruption
octeon-hcd will crash the kernel when SLOB is used. This usually happens
after the 18-byte control transfer when a device descriptor is read.
The DMA engine is always transfering full 32-bit words and if the
transfer is shorter, some random garbage appears after the buffer.
The problem is not visible with SLUB since it rounds up the allocations
to word boundary, and the extra bytes will go undetected.
Fix by providing quirk functions for DMA map/unmap that allocate a bigger
temporary buffer when necessary. Tested by booting EdgeRouter Lite
to USB stick root file system with SLAB, SLOB and SLUB kernels.
Ken Cox [Wed, 19 Mar 2014 18:06:20 +0000 (13:06 -0500)]
Staging: unisys: Remove FAIL_WPOSTCODE_1 macro
Part of a series to get rid of goto statements embedded in macros. I'm
breaking this up into a series of smaller patches for easier review. The
later patches in the series will actually remove the goto statements.
Signed-off-by: Ken Cox <jkc@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ken Cox [Wed, 19 Mar 2014 18:06:19 +0000 (13:06 -0500)]
Staging: unisys: Cleanup macros to get rid of goto statements
Remove the following macros:
TRY
CHKFD
CHKDD
CHKFDX
CHKDDX
ADDPROCLINE
TRY_WPOSTCODE_1
TRY_WPOSTCODE_2
FAIL_WPOSTCODE_2
FAIL_WPOSTCODE_3
Part of a series to get rid of goto statements embedded in macros. I'm
breaking this up into a series of smaller patches for easier review. The later
patches in the series will actually remove the goto statements.
Signed-off-by: Ken Cox <jkc@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Hounschell [Wed, 19 Mar 2014 19:46:57 +0000 (15:46 -0400)]
staging: dgap: fix the rest of the checkpatch warnings in dgap.c
This patch fixes all the simple_strtol and simple_strtoul warnings
as reported by checkpatch. After this patch, checkpatch will report
zero errors or warnings on dgap.c.
Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ana Rey [Wed, 19 Mar 2014 11:47:24 +0000 (12:47 +0100)]
staging: rtl8192u: make in r819xU_firmware.c some local functions static
Make some local functions static (firmware_init_param, fw_download_code,
CPUcheck_maincodeok_turnonCPU and CPUcheck_firmware_ready) and fix
coding style in these function declarations when It is necessary.
Fixed the following sparse warnings in r819xU_firmware.c
CHECK drivers/staging/rtl8192u/r819xU_firmware.c
drivers/staging/rtl8192u/r819xU_firmware.c:20:6: warning: symbol 'firmware_init_param' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware.c:32:6: warning: symbol 'fw_download_code' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware.c:159:6: warning: symbol 'CPUcheck_maincodeok_turnonCPU' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware.c:208:6: warning: symbol 'CPUcheck_firmware_ready' was not declared. Should it be static?
Signed-off-by: Ana Rey <anarey@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ana Rey [Wed, 19 Mar 2014 10:54:53 +0000 (11:54 +0100)]
staging: rtl8192u: Delete duplicate function declarations and extern keyword
Delete the duplicate function declarations in r8192U_dm.c.
These function declarations are defined in r8192U_dm.h.
Also, delete the 'extern' keyword of these function definitions.
Fix the following sparse warnings:
CHECK drivers/staging/rtl8192u/r8192U_dm.c
drivers/staging/rtl8192u/r8192U_dm.c:159:1: warning: function 'init_hal_dm' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:179:13: warning: function 'deinit_hal_dm' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:245:17: warning: function 'hal_dm_watchdog' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:278:13: warning: function 'init_rate_adaptive' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:878:17: warning: function 'dm_txpower_trackingcallback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1609:13: warning: function 'dm_cck_txpower_adjust' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1776:13: warning: function 'dm_change_dynamic_initgain_thresh' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:2543:13: warning: function 'dm_init_edca_turbo' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:2782:17: warning: function 'dm_rf_pathcheck_workitemcallback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:3142:13: warning: function 'dm_fsync_timer_callback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:3481:13: warning: function 'dm_shadow_init' with external linkage has definition
Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ana Rey [Wed, 19 Mar 2014 10:54:54 +0000 (11:54 +0100)]
staging: rtl8192u: Delete 'DM_CTSToSelfSetting' function in r8192U_dm.c
Delete the DM_CTSToSelfSetting function that is not used in
anywhere in the driver.
Fix sparse warnings:
drivers/staging/rtl8192u/r8192U_dm.c:2623:6: warning: symbol 'DM_CTSToSelfSetting' was not declared. Should it be static?
Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ana Rey [Wed, 19 Mar 2014 10:54:55 +0000 (11:54 +0100)]
staging: rtl8192u: Delete 'dm_change_fsync_setting' function in r8192U_dm.c
Delete the 'dm_change_fsync_setting' function that is not used in
anywhere in the driver.
Fix sparse warnings:
drivers/staging/rtl8192u/r8192U_dm.c:1812:6: warning: symbol 'dm_change_fsync_setting' was not declared. Should it be static?
Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ana Rey [Wed, 19 Mar 2014 10:54:57 +0000 (11:54 +0100)]
staging: rtl8192u: Fix whitespaces in function declarations in r8192U_dm.h
Fix whitespaces in function declarations in r8192U_dm.h
Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Tue, 18 Mar 2014 22:33:41 +0000 (00:33 +0200)]
Staging: rtl8188eu: Fix warnings of no space before tabs.
This patch fixes the warnings of "please, no space before tabs" in the
file rtw_mlme.c. I have also modified the comment style and removed some
unnecessary tabs.
Signed-off-by: Elena Oat <oat.elena@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Tue, 18 Mar 2014 20:59:47 +0000 (22:59 +0200)]
Staging: rtl8188eu: Fix warnings of space prohibited.
This patch fixes the warnings of "space prohibited between function name
and open parenthesis" in file rtw_mlme.c.
While at it, I have also removed unneccessary tabs. Also one comment
that didn't make sense was removed.
Signed-off-by: Elena Oat <oat.elena@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Tue, 18 Mar 2014 20:09:21 +0000 (22:09 +0200)]
Staging: rtl8188eu: Fix warning of braces {} are not necessary.
This patch fixes the warning of "braces {} are not necessary for single
statement blocks" in file rtw_mlme.c. I have removed the else statement
in one case, as it didn't have any value.
Signed-off-by: Elena Oat <oat.elena@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mark Hounschell [Wed, 19 Mar 2014 15:10:50 +0000 (11:10 -0400)]
staging: dgap: re-factor some code for 80+ lines as reported by checkpatch
This patch re-factors some code to fix some 80+ lines as reported by checkpatch.
This patch was suggested and authored by Dan Carpenter. A test case for this
patch has been written and used to show the patch to be correct.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Hounschell <markh@compro.net> Tested-by: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gary Rookard [Tue, 18 Mar 2014 20:17:28 +0000 (16:17 -0400)]
Staging: bcm: CmHost: moved and removed declarations and tmp bracing.
Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.
In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.
So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from
the switch/case statement.
Removed temporary bracing from case labels.
Removed new lines as needed.
Properly indented case breaks.
Added /* FALLTHROUGH */ comments to switch/case.
Signed-off-by: Gary Rookard <garyrookard@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Masood Mehmood [Tue, 18 Mar 2014 20:40:14 +0000 (13:40 -0700)]
staging: dgap: Fixed sparse error: same symbol redeclared with different type
sparse reported dgap_do_fep_load is redeclared with different type. while
fixing, I noticed __user attribute is used incorrectly in declaration.
There is no need to define __user for firware->data.
Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
did the same for function dgap_do_bios_load
Monam Agarwal [Tue, 18 Mar 2014 19:36:35 +0000 (01:06 +0530)]
Staging: ced1401: Fix typedef warnings in ced_ioctl.h
This patch fixes following checkpatch.pl warnings:
WARNING:do not add new typedefs.
In this patch i have also renamed TransferDesc to transfer_area_desc in order to clearly indicate
that it describes the transfer area.
Daeseok Youn [Tue, 18 Mar 2014 00:45:40 +0000 (09:45 +0900)]
staging: cxt1e1: remove unneeded mkret() calls
The mkret() change a value of error from positive to
negative. This patch is modified to return negative value
when it failed. It doesn't need to call with function
for changing from positive to negative.
Michael Welling [Tue, 18 Mar 2014 07:14:20 +0000 (02:14 -0500)]
STAGING: comedi: style and checkpatch fixes
Updates block comment per Documentation/CodingStyle.
Also updated due to checkpatch warnings about qouted string
after Lindent modified the spacing slightly.
Signed-off-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Tue, 18 Mar 2014 17:16:49 +0000 (19:16 +0200)]
Staging: rtl8188eu: Fix warning of unchecked sscanf return value.
This patch fixes the warning "unchecked sscanf return value" in file
rtw_mp.c. Zero is returned in case sscanf fails or if less than expected
items are read and assigned successfully. I have decided to return zero,
because in previous conditional statements zero was returned in case of
failure.
While at it, I have also fixed the warning of line over 80
characters.
Signed-off-by: Elena Oat <oat.elena@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gulsah Kose [Sun, 16 Mar 2014 13:21:52 +0000 (15:21 +0200)]
staging: rtl8192e: Fix quoted string split across lines
Fix checkpatch.pl issues with quoted string split across lines in
dot11d.c
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>