A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
accelerometer fields, which is most commonly used in currently
available sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Wei Yongjun [Wed, 30 Oct 2013 03:15:51 +0000 (11:15 +0800)]
staging: drm/imx: fix return value check in ipu_add_subdevice_pdata()
In case of error, the function platform_device_register_data() returns
ERR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().
Rashika Kheria [Wed, 30 Oct 2013 13:06:32 +0000 (18:36 +0530)]
Staging: zram: Fix access of NULL pointer
This patch fixes the bug in reset_store caused by accessing NULL pointer.
The bdev gets its value from bdget_disk() which could fail when memory
pressure is severe and hence can return NULL because allocation of
inode in bdget could fail.
Hence, this patch introduces a check for bdev to prevent reference to a
NULL pointer in the later part of the code. It also removes unnecessary
check of bdev for fsync_bdev().
Rashika Kheria [Wed, 30 Oct 2013 13:13:32 +0000 (18:43 +0530)]
Staging: zram: Fix variable dereferenced before check
This patch fixes the following Smatch warning in zram_drv.c-
drivers/staging/zram/zram_drv.c:899
destroy_device() warn: variable dereferenced before check 'zram->disk' (see line 896)
Rashika Kheria [Tue, 29 Oct 2013 22:46:55 +0000 (04:16 +0530)]
Staging: dwc2: Fix variable dereferenced before check
This patch fixes the following smatch warning in hcd_intr.c-
drivers/staging/dwc2/hcd_intr.c:1946 dwc2_hc_n_intr() warn: variable dereferenced before check 'chan' (see line 1936)
Kelley Nielsen [Tue, 29 Oct 2013 23:06:36 +0000 (16:06 -0700)]
staging: ft1000: return values corrected in scram_start_dwnld
The ft1000 usb driver ignores expected Linux error codes, and uses two
values defined in ft1000_usb.h: STATUS_SUCCESS 0, and STATUS_FAILURE
0x1001; and sometimes -1. This patch changes the return values of the
function scram_start_dwnld to match the status of the handshake returned
by its helper functions, get_handshake and get_handshake_usb. If the
handshake fails, -ENETRESET is returned instead of the inappropriate
STATUS_FAILURE. Also, a new test has been added to differentiate failure
due to timeout from failure due to net reset (the default). -ETIMEDOUT
is returned in this case. Finally, 0 is returned on success instead of
STATUS_SUCCESS.
Kelley Nielsen [Tue, 29 Oct 2013 21:54:31 +0000 (14:54 -0700)]
staging: ft1000: change values of status return variable in write_dpram32_and_check
The ft1000 usb driver ignores expected Linux error codes, and uses two
values defined in ft1000_usb.h: STATUS_SUCCESS 0, and STATUS_FAILURE
0x1001; and sometimes -1. This patch changes the return value of the
function write_dpram_32_and check to 0 or -EREMOTEIO, respectively. The
relevant change was made in the helper function check_buffers (which is
only called from write_dpram32_and_check); it now returns 0 on success
and -EREMOTEIO on failure, and this is allowed to propagate through
write_dpram32_and_check. Assignments to the return variable status that
are no longer needed were removed as well. In one function up the call
chain, dsp_reload in ft1000_hw.c, the status variable was changed from
u16 to int to avoid collecting a signed value in an unsigned variable.
sig_cfg.clk_pol controls the 'di0_polarity_disp_clk' bit of register
IPUx_DI0_GENERAL through the following code in imx-drm/ipu-v3/ipu-di.c:
if (!sig->clk_pol)
di_gen |= DI_GEN_POLARITY_DISP_CLK;
With 'di0_polarity_disp_clk' bit set we do not have stable HDMI output on
mx6solo: contours of pictures look jittery and the white colour does not appear
really white.
Russell King initially reported this problem at:
http://www.spinics.net/lists/arm-kernel/msg279805.html
Inverting 'di0_polarity_disp_clk' leads to stable HDMI output image.
Tested on the following boards:
- mx6solowandboard (HDMI output)
- mx6qwandboard (HDMI output)
- mx6qsabrelite (LVDS)
- mx6qsabresd (HDMI output and LVDS)
- mx6dlsabresd (HDMI output)
- mx53qsb (parallel WVGA display)
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Suggested-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Thu, 24 Oct 2013 03:31:37 +0000 (22:31 -0500)]
staging: r8188eu: Fix sparse warnings in rtl_p2p.c
Sparse displays the following:
CHECK drivers/staging/rtl8188eu/core/rtw_p2p.c
drivers/staging/rtl8188eu/core/rtw_p2p.c:162:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_p2p.c:162:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_p2p.c:162:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_p2p.c:221:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_p2p.c:221:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_p2p.c:221:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_p2p.c:292:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_p2p.c:292:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_p2p.c:292:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_p2p.c:371:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_p2p.c:371:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_p2p.c:371:15: got restricted __le16 *<noident>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Thu, 24 Oct 2013 03:31:36 +0000 (22:31 -0500)]
staging: r8188eu: Fix sparse warnings in rtw_mlme_ext.c
Sparse displays the following:
CHECK drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:1874:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:1874:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:1874:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2221:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2221:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2221:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2583:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2583:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2583:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2750:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2750:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2750:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3002:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3002:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3002:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3197:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3197:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3197:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3311:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3311:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3311:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3563:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3563:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3563:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4522:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4522:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4522:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4750:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4750:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4750:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4906:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4906:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4906:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5040:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5040:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5040:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5184:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5184:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5184:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5322:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5322:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5322:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5654:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5654:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5654:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5769:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5769:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5769:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5894:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5894:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5894:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5996:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5996:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5996:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6066:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6066:15: expected unsigned short [usertype] *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6066:15: got restricted __le16 *<noident>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6200:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6200:15: expected unsigned short *fctrl
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6200:15: got restricted __le16 *<noident>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the use of the `S626_MULT_X1`, `S626_MULT_X2` and `S626_MULT_X4`
clock multiplier values with the equivalent `S626_CLKMULT_1X`,
`S626_CLKMULT_2X` and `S626_CLKMULT_4X` values to avoid duplication.
Replace the use of `S626_MULT_X0` with a new macro
`S626_CLKMULT_SPECIAL` (this is treated specially by the
'ClkMultA'/'ClkMultB' field of the 'CRA'/'CRB' register). Remove the
now unused `S626_MULT_X?` macros.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 21 Oct 2013 09:10:38 +0000 (10:10 +0100)]
staging: comedi: s626: remove S626_BF_* macros
The `S626_BF_*` bitfield position macros are no longer used and are just
a subset of the corresponding `S626_STDBIT_*` bitfield position macros.
Remove them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The 'IndxSrc' value for the standardized encoder setup is currently 1
bit wide and takes one of the following values:
S626_INDXSRC_HARD = 0 // index source from hardware encoder
S626_INDXSRC_SOFT = 1 // index source software controlled by IndxPol
However the hardware 'IndxSrcA' and 'IndxSrcB' values for the 'A' and
'B' counters are 2 bits wide. The above standardized values 0 and 1
correspond to the hardware values 0 and 2.
In order to simplify conversions between the standardized values and
hardware values, expand the range of standardized values to cover all
four possible values. The new values are as follows:
S626_INDXSRC_ENCODER = 0 // index source from hardware encoder
S626_INDXSRC_DIGIN = 1 // index source from digital inputs
S626_INDXSRC_SOFT = 2 // index source s/w controlled by IndxPol
S626_INDXSRC_DISABLED = 2 // index source disabled
(Note the change in value for `S626_INDXSRC_SOFT` and the replacement of
`S626_INDXSRC_HARD` with `S626_INDXSRC_ENCODER` for consistency with the
`CntSrc` values.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Mon, 21 Oct 2013 09:10:36 +0000 (10:10 +0100)]
staging: comedi: s626: make CRA and CRB setup conversions more readable
Use the new macros defined in "s626.h" for constructing and decomposing
'CRA', 'CRB' and standardized encoder setup values to make the
conversions between standardized encoder setup values, and CRA/CRB
register values easier to follow.
There is some messing about with the 'IndxSrc' values which are 1-bit
wide in the standardized encoder setup, and 2-bit wide in the 'CRA' and
'CRB' register values. This will be addressed by a later patch.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wei Yongjun [Fri, 25 Oct 2013 09:07:18 +0000 (17:07 +0800)]
staging: drm/imx: fix return value check in imx_drm_init()
In case of error, the function platform_device_register_simple() returns
ERR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().
Himangi Saraogi [Tue, 29 Oct 2013 00:58:03 +0000 (06:28 +0530)]
Stging: bcm: Adapter.h : removed typedef from struct _U_IP_ADDRESS and changed it to lowercase
Running checkpatch.pl on the file drivers/staging/bcm/Adapter.h gave
an error as it is a mistake to use typedef for structures
according to CodeingStyle as it reduces readability. The typedef was
removed and all occurrences of the typedef union were replaced with
union u_ip_address as types are all lowercase.
Teodora Baluta [Mon, 28 Oct 2013 22:09:18 +0000 (00:09 +0200)]
staging: comedi: use memdup_user to simplify code
Use memdup_user rather than duplicating implementation. Fix following
coccinelle warnings:
drivers/staging/comedi/comedi_fops.c:1425:5-12: WARNING opportunity for memdup_user
drivers/staging/comedi/comedi_fops.c:1553:6-13: WARNING opportunity for memdup_user
Kelley Nielsen [Tue, 29 Oct 2013 15:08:06 +0000 (08:08 -0700)]
staging: ft1000: status variables changed to int in ft1000_download.c
Linux uses a return type of int for status codes. The file
ft1000_download.c uses a mixture of u16 and u32. This patch changes all
variables called status or Status to ints, whether they are returned
from the function or not. It also changes the return type of all
functions returning one of the variables to correspond. Also, the
declaration of scram_dnldr has been changed in ft1000_usb.h.
Kelley Nielsen [Tue, 29 Oct 2013 15:07:40 +0000 (08:07 -0700)]
staging: ft1000: style issues fixed in write_blk
function write_blk, in ft1000_download.c, contains many coding style
issues. It has indentations of 3 spaces, long lines, C99 comments, and
extra whitespace. It also has a return type of u32, and changing the
returned variable in the function triggers a checkpatch leading spaces
warning. Indentation should be fixed throughout the file for
consistency.
This patch fixes those issues, in preparation for correcting the status
return type throughout the file. The variable Status has been changed
from u32 to int and renamed status.
Kelley Nielsen [Tue, 29 Oct 2013 15:06:56 +0000 (08:06 -0700)]
staging: ft1000: function write_dpram32_and_check extracted from write_blk
function write_blk is long and overly complex, consisting of a triply
nested loop. It also has improper indentation and line lengths
throughout, and has return type of u32 rather than int. Some of the
lines, when converted to proper indentation, create checkpatch warnings
for too many leading tabs.
This patch extracts the innermost loop into its own function,
write_dpram32_and_check. This removes several levels of indentation from
the extracted lines and makes the original function simpler. Two local
variables from the original function, u16 resultbuffer[] and a loop
counter, have been made local variables of the new function. Two calls
to msleep() have been replaced with usleep_range() as per Documentation/
timers/timers-howto.txt (which was referred to in a checkpatch warning).
Several other style issues in the extracted code have been corrected as
well.
Kelley Nielsen [Tue, 29 Oct 2013 15:05:23 +0000 (08:05 -0700)]
staging: ft1000: duplicate code replaced with call to request_code_segment
function scram_dnldr, in ft1000_download.c, is very long and consists
mainly of nested switch statements inside a while loop. Some code in one
of the inner switch cases was almost identical to the code in the
previously extracted function request_code_segment. The duplicated code
was replaced with a call to request_code_segment, and
request_code_segment was slightly modified to work in both cases.
A new parameter was added to request_code_segment, a bool to distinguish
which case it was replacing. The name of an existing parameter (now
called endpoint) was changed to reflect the fact that it will be passed
in from more than one place. Several lines from the case containing the
duplicated code were moved to request_code_segment, and a test was added
to determine if these lines or a line from the original function should
be run.
Finally, an unused variable (tempword) was removed from scram_dnldr.
Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kelley Nielsen [Tue, 29 Oct 2013 15:01:50 +0000 (08:01 -0700)]
staging: ft1000: function request_code_segment extracted
function scram_dnldr in ft1000_download.c is very long and contains many
coding style errors and best practice violations. It consists of nested
switch statements inside a while loop. One of the inner switch cases has
been extracted as a helper function. Also, some style errors (such as
C99 comments) have been fixed, an assignment to an unread variable has
been removed, and break statements inside ifs have been converted to
returns.
Kelley Nielsen [Sun, 27 Oct 2013 23:40:39 +0000 (16:40 -0700)]
staging: ft1000: function scram_start_dwnld extracted from scram_dnldr in ft1000_download.c
function scram_dnldr is over 500 lines long, with deep indents that
trigger checkpatch warnings for too many tabs. It mainly consists of a
switch statement with long, complicated cases. The first case has been
extracted to form the helper function scram_start_dwnld. Some style
issues in the extracted lines have been corrected as well.
Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Sun, 27 Oct 2013 14:21:59 +0000 (19:51 +0530)]
Staging: ft1000: Fix assignment of bool to 0/1 in ft1000_hw.c
This patch fixes the following coccinelle warning in ft1000-usb/ft1000_hw.c-
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1444:1-19: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1937:16-34: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1938:16-35: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1570:4-22: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1575:4-22: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:636:1-26: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:638:1-25: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:669:1-26: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:755:1-23: WARNING: Assignment of bool to 0/1
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:756:1-26: WARNING: Assignment of bool to 0/1
Rashika Kheria [Sun, 27 Oct 2013 14:20:45 +0000 (19:50 +0530)]
Staging: ft1000: Fix assignment of bool to non-0/1 constant in ft1000_download.c
This patch fixes the following coccinelle error in ft1000-usb/ft1000_download.c -
drivers/staging/ft1000/ft1000-usb/ft1000_download.c:615:1-16: ERROR: Assignment of bool to non-0/1 constant
drivers/staging/ft1000/ft1000-usb/ft1000_download.c:926:5-20: ERROR: Assignment of bool to non-0/1 constant
drivers/staging/ft1000/ft1000-usb/ft1000_download.c:943:7-22: ERROR: Assignment of bool to non-0/1 constant
Rashika Kheria [Sun, 27 Oct 2013 14:19:38 +0000 (19:49 +0530)]
Staging: ft1000: Fix assignment of bool to non-0/1 constant in ft1000_usb.c
This patch fixes the following coccinelle error in ft1000-usb/ft1000_usb.c-
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:50:4-18: ERROR: Assignment of bool to non-0/1 constant
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:174:1-15: ERROR: Assignment of bool to non-0/1 constant
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:39:12-26: ERROR: Assignment of bool to non-0/1 constant
Rashika Kheria [Sat, 26 Oct 2013 17:42:19 +0000 (23:12 +0530)]
Staging: dwc2: Fix return error value in dwc2_driver_probe()
This patch fixes the following smatch warning in platform.c-
drivers/staging/dwc2/platform.c:109 dwc2_driver_probe() info: why not propagate 'irq' from platform_get_irq() instead of (-22)?
Rashika Kheria [Sat, 26 Oct 2013 17:41:22 +0000 (23:11 +0530)]
Staging: dwc2: Fix conditional statement since urb->actual_length is never less than zero.
This patch fixes the following smatch warning in hcd.c:
drivers/staging/dwc2/hcd.c:787 dwc2_assign_and_init_hc() warn: unsigned 'urb->actual_length' is never less than zero.
Rashika Kheria [Sat, 26 Oct 2013 12:29:50 +0000 (17:59 +0530)]
Staging: sbe-2t3e3: Fix smatch warning of function definition with external linkage
This patch fixes the following smatch warning in cpld.c-
drivers/staging/sbe-2t3e3/cpld.c:243:13: warning: function 'cpld_set_clock' with external linkage has definition
Teodora Baluta [Sat, 26 Oct 2013 06:18:22 +0000 (09:18 +0300)]
staging: rtl8192e: use memdup_user to simplify code
Use memdup_user rather than duplicating its implementation. This patch
fixes the following coccinelle warnings:
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2598:8-15: WARNING opportunity for memdup_user
drivers/staging/rtl8192e/rtllib_softmac.c:3594:9-16: WARNING opportunity for memdup_user
Teodora Baluta [Fri, 25 Oct 2013 09:00:17 +0000 (12:00 +0300)]
staging: rtl8187se: fix code allignment
Fix confusingly indented code after if. This patch fixes the following
coccinelle issues:
drivers/staging/rtl8187se/r8180_wx.c:1148:2-11: code aligned with following code on line 1150
drivers/staging/rtl8187se/r8180_dm.c:668:1-84: code aligned with following code on line 674
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:623:2-38: code aligned with following code on line 625
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:148:1-85: code aligned with following code on line 149
Teodora Baluta [Fri, 25 Oct 2013 09:00:15 +0000 (12:00 +0300)]
staging: rtl8187se: fix assignment of bool to 0/1
This patch fixes the following coccinelle warnings:
drivers/staging/rtl8187se/r8180_core.c:2433:1-20: WARNING: Assignment of bool to 0/1
drivers/staging/rtl8187se/r8180_core.c:2275:3-34: WARNING: Assignment of bool to 0/1
Teodora Baluta [Fri, 25 Oct 2013 08:27:09 +0000 (11:27 +0300)]
staging: rtl8192u: use memdup_user to simplify code
Use memdup_user rather than duplicating its implementation. Fix the
following coccinelle warnings:
drivers/staging/rtl8192u/r8192U_core.c:3792:7-14: WARNING opportunity for memdup_user
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3153:9-16: WARNING opportunity for memdup_user
Teodora Baluta [Mon, 21 Oct 2013 23:37:14 +0000 (02:37 +0300)]
staging: rtl8187se: fix checkpatch space and tab warnings
This patch fixes checkpatch issues regarding space and tab like:
WARNING: please, no spaces at the start of a line
ERROR: code indent should use tabs where possible
WARNING: suspect code indent for conditional statements (2, 4)
ERROR: space required before the open parenthesis '('
ERROR: space required after that ',' (ctx:VxO)
Teodora Baluta [Mon, 21 Oct 2013 23:37:13 +0000 (02:37 +0300)]
staging: rtl8187se: use C89 comment style instead of C99-style
This patch fixes the comments in file ieee80211/ieee80211_tx.c from
driver rtl8187se, as reported by checkpatch. The C89 comments that
contain code
are deleted.
staging: vt6656: removed space after '*' in pointer declaration
space after '*' in pointer declaration is not preferred in linux
and results in checkpatch error. Hence removed the spaces present
after the '*' in pointer declarations to fix the checkpatch errors
Lisa Nguyen [Mon, 28 Oct 2013 00:55:05 +0000 (17:55 -0700)]
staging: lustre: lnet: Rewrite return statement in socklnd.c
Rewrite the return statement in socklnd.c to eliminate the
use of a ternary operator. This will prevent the checkpatch.pl
script from generating a warning saying to remove () from
this particular return statement.
Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Teodora Baluta [Tue, 22 Oct 2013 22:15:26 +0000 (01:15 +0300)]
staging: gdm724x: kzalloc should be used instead of kmalloc/memset
This patch fixes the following coccinelle warnings in driver gdm724x:
drivers/staging/gdm724x/gdm_usb.c:127:9-16: WARNING: kzalloc should be used for t_sdu, instead of kmalloc/memset
drivers/staging/gdm724x/gdm_usb.c:91:5-12: WARNING: kzalloc should be used for t, instead of kmalloc/memset
Signed-off-by: Teodora Baluta <teobaluta@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ktap should be merged through the "proper" place in the kernel tree, in
the perf tool, not as a stand-alone kernel module in staging. So remove
it from here for now so that it can be merged correctly later.
Merge tag 'iio-for-3.13e' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Fifth round of IIO new drivers, cleanups and functionality for the 3.13 cycle.
New Driver
* Freescale mag3110 magnetometer driver.
New functionality
* Add LPS001WP support to the ST pressure driver.
* Allow the max1363 driver to use only smbus functions for 8 bit devices. This
allows the driver to be used when more extensive i2c support is not
available.
Cleanups
* Fix incorrect description of unit conversions in ak8975.
* Switch to pr_err in industrialio-core.c instead of direct printk calls.
* Some simple redundant error handling removal patches.
* Trivial warning suppression by adding brackets to a sizeof call.
* Drop redundant of_match_ptr casts in drivers that are dependent on
OF supporting being present. The only purpose of the of_match_ptr
wrapper was to make stubbing out of the relevant structures trivial.
Fixes
* Make MXS_LRADC depend on INPUT to avoid compile failures. This fixes an
issue introduced in the previous pull in this cycle.
Chen Gang [Thu, 24 Oct 2013 01:55:17 +0000 (09:55 +0800)]
drivers: staging: rtl8188eu: use 'ccflags-y' instead of EXTRA_CFLAGS in Makefile
If command line use EXTRA_CFLAGS (e.g. "EXTRA_CFLAGS=-mmedium-calls"
for arc architecture, with allmodconfig), it can not pass compiling,
the related error:
drivers/staging/rtl8188eu/core/rtw_ap.c:22:27: fatal error: osdep_service.h: No such file or directory
Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: winbond: removing unused variables thread_count and link_name[]
Removing the variable thread_count and link_name[WB_MAX_LINK_NAME_LEN] array
since they are not used elsewhere in the driver
Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>