cascardo/linux.git
10 years agoStaging:rtl8187se: Insert spaces after commas
Himangi Saraogi [Wed, 6 Nov 2013 11:26:33 +0000 (16:56 +0530)]
Staging:rtl8187se: Insert spaces after commas

This patch fixes the checkpatch.pl warnings
space required after that ',' in ieee80211/ieee80211_softmac.c

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8187se: Use preferred library linux/uaccess.h over asm/uaccess.h
Himangi Saraogi [Wed, 6 Nov 2013 05:40:24 +0000 (11:10 +0530)]
staging:rtl8187se: Use preferred library linux/uaccess.h over asm/uaccess.h

This patch fixes the checkpatch.pl warning "Use #include
<linux/uaccess.h> instead of <asm/uaccess.h>" in
ieee80211/ieee80211_softmac.c .

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8187se: Shift open brace of function declarations to next line
Himangi Saraogi [Tue, 5 Nov 2013 22:06:11 +0000 (03:36 +0530)]
staging:rtl8187se: Shift open brace of function declarations to next line

This patch fixes the checkpatch.pl error "open brace '{' following
function declarations go on the next line" in ieee80211_softmac.c.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix C99 style commenting in dot11d.h
Himangi Saraogi [Sun, 3 Nov 2013 10:46:14 +0000 (16:16 +0530)]
Staging: rtl8187se: Fix C99 style commenting in dot11d.h

This patch fixes the checkpatch.pl error "do not use C99 // comments"
in ieee80211/dot11d.n.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Remove useless comments in dot11d.c
Rashika Kheria [Sat, 2 Nov 2013 17:35:19 +0000 (23:05 +0530)]
Staging: rtl8187se: Remove useless comments in dot11d.c

This patch removes unnecessary comments in ieee80211/dot11d.c.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Remove unnecessary return statement in ieee80211_crypt_tkip.c
Rashika Kheria [Sat, 2 Nov 2013 17:33:43 +0000 (23:03 +0530)]
Staging: rtl8187se: Remove unnecessary return statement in ieee80211_crypt_tkip.c

This patch removes an unnecessary return statement in the function
ieee80211_tkip_null() in ieee80211/ieee80211_crypt_tkip.c.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix code indent should use tabs in ieee80211_crypt_tkip.c
Rashika Kheria [Sat, 2 Nov 2013 17:28:20 +0000 (22:58 +0530)]
Staging: rtl8187se: Fix code indent should use tabs in ieee80211_crypt_tkip.c

This patch fixes the following checkpatch.pl issues in
ieee80211/ieee80211_crypt_tkip.c-
ERROR: code indent should use tabs where possible

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Replace "foo * bar" with "foo *bar" in ieee80211_crypt_tkip.c
Rashika Kheria [Sat, 2 Nov 2013 17:27:07 +0000 (22:57 +0530)]
Staging: rtl8187se: Replace "foo * bar" with "foo *bar" in ieee80211_crypt_tkip.c

This patch fixes the following checkpatch.pl issues in
ieee80211/ieee80211_crypt_tkip.c-
ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Remove useless comments in ieee80211_crypt_tkip.c
Rashika Kheria [Sat, 2 Nov 2013 17:25:52 +0000 (22:55 +0530)]
Staging: rtl8187se: Remove useless comments in ieee80211_crypt_tkip.c

This patch removes useless comments in ieee80211/ieee80211_crypt_tkip.c.
And, hence also removes the following checkpatch.pl issue-
ERROR: do not use C99 // comments

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix quoted strings split across lines in ieee80211_crypt_ccmp.c
Rashika Kheria [Sat, 2 Nov 2013 17:24:39 +0000 (22:54 +0530)]
Staging: rtl8187se: Fix quoted strings split across lines in ieee80211_crypt_ccmp.c

This patch fixes the following checkpatch.pl issues in
ieee80211/ieee80211_crypt_ccmp.c-
WARNING: quoted string split across lines

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Remove unnecessary comments in ieee80211_crypt_ccmp.c
Rashika Kheria [Sat, 2 Nov 2013 17:23:07 +0000 (22:53 +0530)]
Staging: rtl8187se: Remove unnecessary comments in ieee80211_crypt_ccmp.c

This patch removes unnecessary comments written in ieee80211/ieee80211_crypt_ccmp.c.
And hence also, removes the following checkpatch.pl issue-
ERROR: do not use C99 // comments

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix line over 80 characters in dot11d.c
Rashika Kheria [Sat, 2 Nov 2013 17:21:26 +0000 (22:51 +0530)]
Staging: rtl8187se: Fix line over 80 characters in dot11d.c

This patch fixes the following checkpatch.pl issues in
ieee80211/dot11d.c-
WARNING: line over 80 characters

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Remove unnecessary braces around single statement in dot11d.c
Rashika Kheria [Sat, 2 Nov 2013 17:19:59 +0000 (22:49 +0530)]
Staging: rtl8187se: Remove unnecessary braces around single statement in dot11d.c

This patch fixes the following checkpatch.pl issues in
ieee80211/dot11d.c-
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix space prohibited before semicolon in dot11d.c
Rashika Kheria [Sat, 2 Nov 2013 17:17:45 +0000 (22:47 +0530)]
Staging: rtl8187se: Fix space prohibited before semicolon in dot11d.c

This patch fixes the following checkpatch.pl issues in
ieee80211/dot11d.c-
WARNING: space prohibited before semicolon

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix printk() should include KERN_ facility level
Rashika Kheria [Sat, 2 Nov 2013 17:16:00 +0000 (22:46 +0530)]
Staging: rtl8187se: Fix printk() should include KERN_ facility level

This patch fixes the following checkpatch.pl issues in
ieee80211/dot11d.c-
WARNING: printk() should include KERN_ facility level

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix C99 style commenting in dot11d.c
Rashika Kheria [Sat, 2 Nov 2013 17:14:38 +0000 (22:44 +0530)]
Staging: rtl8187se: Fix C99 style commenting in dot11d.c

This patch fixes the following checkpatch.pl issues in
ieee80211/dot11d.c-
ERROR: do not use C99 // comments

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers : staging :rtl8187se : r8180_core.c : remove space before semicolon
Himangi Saraogi [Thu, 31 Oct 2013 03:31:41 +0000 (09:01 +0530)]
drivers : staging :rtl8187se : r8180_core.c : remove space before semicolon

This patch removes the checkpatch.pl warning space prohibited before
semicolon.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: imx-drm: remove unnecessary braces
Sima Baymani [Sun, 3 Nov 2013 10:18:57 +0000 (11:18 +0100)]
staging: imx-drm: remove unnecessary braces

Fix checkpatch warning by removing unnecessary braces.
Compile-tested the single file.

Signed-off-by: Sima Baymani <sima.baymani@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Archana Kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: imx-drm: Fix warning for static const char * array in imx-ldb.c
Archana kumari [Wed, 30 Oct 2013 19:04:08 +0000 (00:34 +0530)]
staging: imx-drm: Fix warning for static const char * array in imx-ldb.c

This patch fixes the warning "static const char * array should
probably be static const char * const" in imx-ldb.c.

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: fix long lines warning
Sima Baymani [Tue, 5 Nov 2013 20:28:56 +0000 (21:28 +0100)]
staging: cxt1e1: fix long lines warning

Break up long lines per checkpatch warnings.

Signed-off-by: Sima Baymani <sima.baymani@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: remove typedef comet_t
Sima Baymani [Tue, 5 Nov 2013 20:49:16 +0000 (21:49 +0100)]
staging: cxt1e1: remove typedef comet_t

Remove typedef declaration per checkpatch warning.
Built and loaded.

Signed-off-by: Sima Baymani <sima.baymani@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: comet,h - fix placement of braces
Sima Baymani [Tue, 5 Nov 2013 20:22:56 +0000 (21:22 +0100)]
staging: cxt1e1: comet,h - fix placement of braces

Fix bad placement of braces per checkpatch warning.

Signed-off-by: Sima Baymani <sima.baymani@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: comet.h - fix long lines warning
Sima Baymani [Tue, 5 Nov 2013 20:22:12 +0000 (21:22 +0100)]
staging: cxt1e1: comet.h - fix long lines warning

Fix long lines warnings from checkpatch which were introduced in
previous patch in series due to reindentation.

Signed-off-by: Sima Baymani <sima.baymani@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: comet.h - fix wrong indentation
Sima Baymani [Tue, 5 Nov 2013 20:21:38 +0000 (21:21 +0100)]
staging: cxt1e1: comet.h - fix wrong indentation

Reindent needed parts of comet.h per checkpatch warnings - whitespace
changes only.

This patch introduces long line warnings because of the reindentation.
Those warnings are fixed by the next patch in series.

Signed-off-by: Sima Baymani <sima.baymani@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/cxt1e1:Fixes incorrect brace placement
Dulshani Gunawardhana [Wed, 30 Oct 2013 18:49:54 +0000 (00:19 +0530)]
staging/cxt1e1:Fixes incorrect brace placement

This patch fixes the error "This open brace { should be on the
above line" detected via checkpatch.pl.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: fix remaining checkpatch issues in ft1000_hw.c
Kelley Nielsen [Wed, 6 Nov 2013 13:10:19 +0000 (05:10 -0800)]
staging: ft1000: fix remaining checkpatch issues in ft1000_hw.c

The file ft1000_hw.c is still full of coding style problems that make it
challenging to read and understand. The lines inside the switch cases
in ft1000_proc_drvmsg() are indented too deeply, so remove one leading
tab. Join lines that are now able to fit in the 80 character limit.
This will take care of the "too many leading tabs" issue. Run
checkpatch.pl on the file, and correct all other issues it reports
(except lines with user visible strings over 80 chars).

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Suggested-by: Waskiewicz Jr, Peter P <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: flatten nesting in dsp_broadcast_msg_id()
Kelley Nielsen [Wed, 6 Nov 2013 13:09:56 +0000 (05:09 -0800)]
staging: ft1000: flatten nesting in dsp_broadcast_msg_id()

The function dsp_broadcast_msg_id() has four levels of nesting. Move the
handling for failed allocation for *dpram_blk from the else block at the
end to the block immediately following the test, reverse the sense of the
test, and exit with an error code if the allocation fails. This eliminates
descending into an if block if the allocation is successful. Move all
lines inside the removed block one tab to the left, and join lines
that will fall under the 80 char limit.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: fix checkpatch issues in ft1000_poll()
Kelley Nielsen [Wed, 6 Nov 2013 13:09:30 +0000 (05:09 -0800)]
staging: ft1000: fix checkpatch issues in ft1000_poll()

The function ft1000_poll(), in ft1000_hw.c, has many miscellaneous
coding style issues, such as improper indentation, C99 comments, use of
msleep(), and lines over 80 characters. Changes all spaces at the start
of lines to the proper number of tabs. Convert C99 comments to standard
/* */ style. Change calls to msleep(10) to usleep_range(9000, 11000).
Break lines over 80 characters, unless they are user visible strings.
Remove space before open paren in function calls. Fix any other issues
that checkpatch finds.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: flatten nesting in handle_misc_portid
Kelley Nielsen [Wed, 6 Nov 2013 13:08:58 +0000 (05:08 -0800)]
staging: ft1000: flatten nesting in handle_misc_portid

The newly extracted function handle_misc_portid still has several
unnecessary levels of nesting, having inherited its logic from the
original extracted lines. Move handling for failed memory allocation
(of *pdpram_blk) to the top of the function, and return -1 from within
it. This eliminates the if statement around the body of the function.
Change two levels of nested if/else to an if/else-if/else. Create a
label, exit_failure, at the end of the function with the cleanup code,
and goto it at all points of failure. Also, goto it if the call to
ft1000_receive_cmd() fails, instead of descending into an if block if
it succeeds. Pull all lines from inside the former if blocks to the
left, and rejoin lines to take advantage of reclaimed horizontal space.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: extract helper handle_misc_portid()
Kelley Nielsen [Wed, 6 Nov 2013 13:08:11 +0000 (05:08 -0800)]
staging: ft1000: extract helper handle_misc_portid()

The function ft1000_poll, in ft1000_hw.c, is complex, with deep levels
of nesting, unnecessary variables, and style issues. Extract the default
case of the switch statement to its own function, handle_misc_portid.
Make the variable struct dpram_blk *pdpram_blk local to the new function
and remove it from the old. The variable struct pseudo_hdr *ppseudo_hdr is
used only once, to access a member of another struct, so eliminate it
and access the member directly. Return -1 in all the places where the
code fails, and 0 on successful completion. Fix coding style errors.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: extract dsp_broadcast_msg_id()
Kelley Nielsen [Wed, 6 Nov 2013 05:39:10 +0000 (21:39 -0800)]
staging: ft1000: extract dsp_broadcast_msg_id()

The function ft1000_poll, in ft1000_hw.c, is overly complex, with at
least five levels of nesting. Extract the lines in switch case
DSPBCMSGID into their own function, called dsp_broadcast_msg_id(). Pass
one parameter, struct ft1000_usb *dev. Make a copy of struct dpram_blk
*pdpram_blk local to the new function, since it is initialized at the
top of each case in which it appears. Make unsigned long flags local to
the new function. Remove the assignment to struct pseudo_hdr
*ppseudo_hdr, which is otherwise unused in the switch case, and receives
the same assignment at the top of each case in which it appears. Return
an int, 0 for success and -1 for error. Correct style issues in the
extracted lines.

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>
10 years agostaging: ft1000: remove unused variable nxtph
Kelley Nielsen [Wed, 6 Nov 2013 05:36:55 +0000 (21:36 -0800)]
staging: ft1000: remove unused variable nxtph

The function ft1000_poll, in ft1000_hw.c, is overly complex, with at
least five different levels of nesting. While preparing to extract one
of the cases to its own function, I discovered that the variable nxtph
is not used. It is declared and assigned a value in ft1000_poll(), then
passed by reference to the helper function ft1000_receive_command(),
which receives it as parameter. pnxtph does not appear in the body of
this function. Remove all occurrences of nxtph and pnxtph.

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>
10 years agostaging: ft1000: STATUS defines completely removed
Kelley Nielsen [Thu, 31 Oct 2013 01:05:16 +0000 (18:05 -0700)]
staging: ft1000: STATUS defines completely removed

The ft1000 driver ignores the normal Linux error codes, using its
own macros, STATUS, STATUS_SUCCESS, and STATUS_FAILURE, instead.
Unsigned variables (u16 and u32) are sometimes used to hold them.
This patch converts all occurences of these macros to 0, 0 and -1,
respectively. It also changes the last remaining status variables
(mostly called status and ret) to ints, and removes the declarations
of the macros. This patch does not correct the whitespace issues
in the lines where the changes were made.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: remove formal function headers from ft1000_hw.c
Kelley Nielsen [Thu, 31 Oct 2013 01:04:41 +0000 (18:04 -0700)]
staging: ft1000: remove formal function headers from ft1000_hw.c

The file ft1000_hw.c contains formal C99 style function headers that
waste space and convey little to no useful information. This patch
converts the headers to either one line standard /* */ style comments
or shorter standard style headers with parameter lists (if the parameter
list seemed helpful), or eliminates them entirely. Besides needing to be
made of its own accord, this change is in preparation to eliminate the
nonstandard STATUS_* #defines from the driver since they were cited in most
of the headers.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: STATUS_ defines removed from ft1000_download.c
Kelley Nielsen [Wed, 30 Oct 2013 18:48:34 +0000 (11:48 -0700)]
staging: ft1000: STATUS_ defines removed from ft1000_download.c

Two files in the ft1000 usb driver ignore expected Linux error codes,
and instead use two STATUS_SUCCESS 0, and STATUS_FAILURE
0x1001. This patch removes all remaining occurrences of these from the
file ft1000_download.c. All occurrences of STATUS_SUCCESS have been
replaced by 0, and occurrences of STATUS_FAILURE have been replaced by
-1. One occurence of STATUS_FAILURE has been completely removed:
get_handshake collects either a local #define or 0 from its helper
function, check_usb_db, and immediately sets the collecting variable to
STATUS_FAILURE if the #define is returned. check_usb_db has been
modified to return -1 instead of the #define.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: drm/imx: fix return value check in ipu_add_subdevice_pdata()
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().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: zram: Fix access of NULL pointer
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().

Cc: stable <stable@vger.kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: zram: Fix variable dereferenced before check
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)

Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: space prohibited before semicolon in r8185b_init.c
Ebru Akagunduz [Tue, 29 Oct 2013 21:05:25 +0000 (23:05 +0200)]
Staging: rtl8187se: space prohibited before semicolon in r8185b_init.c

Fix checkpatch.pl issues with space prohibited
before semicolon in r8185b_init.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: fix space prohibited after that open parenthesis '(' in r8185b_init.c
Ebru Akagunduz [Tue, 29 Oct 2013 21:05:24 +0000 (23:05 +0200)]
Staging: rtl8187se: fix space prohibited after that open parenthesis '(' in r8185b_init.c

Fix checkpatch.pl issues with space prohibited after that
open parenthesis '(' in r8185b_init.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: fix braces {} are not necessary for single statement blocks in...
Ebru Akagunduz [Tue, 29 Oct 2013 21:05:23 +0000 (23:05 +0200)]
Staging: rtl8187se: fix braces {} are not necessary for single statement blocks in r8185b_init.c

Fix checkpatch.pl issues with braces {} are not necessary
for single statement blocks in r8185b_init.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: fix trailing whitespace in r8185b_init.c
Ebru Akagunduz [Tue, 29 Oct 2013 21:05:21 +0000 (23:05 +0200)]
Staging: rtl8187se: fix trailing whitespace in r8185b_init.c

Fix checkpatch.pl issues with trailing whitespace
in r8185b_init.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: fix please, no space before tabs in r8185b_init.c
Ebru Akagunduz [Tue, 29 Oct 2013 21:05:20 +0000 (23:05 +0200)]
Staging: rtl8187se: fix please, no space before tabs in r8185b_init.c

Fix checkpatch.pl issues with please, no space before
tabs in r8185b_init.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers/staging/nvec/Kconfig: remove trailing whitespace
Himangi Saraogi [Wed, 30 Oct 2013 01:00:49 +0000 (06:30 +0530)]
drivers/staging/nvec/Kconfig: remove trailing whitespace

This patch fixes checkpatch.pl error trailing whitespace.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: dwc2: Fix variable dereferenced before check
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)

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: xgifb: fix braces {} are not necessary for any arm of this statement
Ebru Akagunduz [Tue, 29 Oct 2013 20:50:54 +0000 (22:50 +0200)]
Staging: xgifb: fix braces {} are not necessary for any arm of this statement

Fix checkpatch.pl issues with braces {} are not necessary
for any arm of this statement in vb_setmode.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192e: remove unneeded semicolons
Valentina Manea [Tue, 29 Oct 2013 19:06:52 +0000 (21:06 +0200)]
staging: rtl8192e: remove unneeded semicolons

This fixes coccinelle errors regarding unneeded
semicolons.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192e: use true and false for bool variables
Valentina Manea [Tue, 29 Oct 2013 18:58:48 +0000 (20:58 +0200)]
staging: rtl8192e: use true and false for bool variables

This patch fixes coccinelle errors for bool variables
initialized with 1 or 0 instead of true and false.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: return values corrected in scram_start_dwnld
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.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: change values of status return variable in write_dpram32_and_check
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.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Remove unnecessary pointer casting
Lisa Nguyen [Tue, 29 Oct 2013 21:19:50 +0000 (14:19 -0700)]
staging: bcm: Remove unnecessary pointer casting

Some void pointers can be assigned to other
pointer variables in functions without casting.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoimx-drm: ipuv3-crtc: Invert IPU DI0 clock polarity
Fabio Estevam [Tue, 29 Oct 2013 21:42:22 +0000 (19:42 -0200)]
imx-drm: ipuv3-crtc: Invert IPU DI0 clock polarity

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>
10 years agostaging: r8188eu: Fix sparse warnings in rtl_p2p.c
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>
10 years agostaging: r8188eu: Fix sparse warnings in rtw_mlme_ext.c
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>
10 years agostaging: r8188eu: Fix sparse warnings in rtl8188e.cmd.c
Larry Finger [Thu, 24 Oct 2013 03:31:35 +0000 (22:31 -0500)]
staging: r8188eu: Fix sparse warnings in rtl8188e.cmd.c

Sparse displays the following:

  CHECK   drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:285:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:285:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:285:15:    got restricted __le16 *<noident>
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:368:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:368:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:368:15:    got restricted __le16 *<noident>
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:403:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:403:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:403:15:    got restricted __le16 *<noident>
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:465:15: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:465:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:465:15:    got restricted __le16 *<noident>

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Fix sparse warnings in rtw_ieee80211.c
Larry Finger [Thu, 24 Oct 2013 03:31:34 +0000 (22:31 -0500)]
staging: r8188eu: Fix sparse warnings in rtw_ieee80211.c

Sparse reports the following:

  CHECK   drivers/staging/rtl8188eu/core/rtw_ieee80211.c
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1593:14: warning: cast to restricted __le16

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: s626: replace S626_MULT_X? values
Ian Abbott [Mon, 21 Oct 2013 09:10:39 +0000 (10:10 +0100)]
staging: comedi: s626: replace S626_MULT_X? values

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>
10 years agostaging: comedi: s626: remove S626_BF_* macros
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>
10 years agostaging: comedi: s626: expand standardized IndxSrc values
Ian Abbott [Mon, 21 Oct 2013 09:10:37 +0000 (10:10 +0100)]
staging: comedi: s626: expand standardized IndxSrc values

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>
10 years agostaging: comedi: s626: make CRA and CRB setup conversions more readable
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>
10 years agostaging: drm/imx: fix return value check in imx_drm_init()
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().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: adl_pci9118: fix a misaligned comment
Ian Abbott [Mon, 21 Oct 2013 09:42:37 +0000 (10:42 +0100)]
staging: comedi: adl_pci9118: fix a misaligned comment

As pointed out by Hartley Sweeten, one of my recent patches resulted in
the start of a multi-line comment ending up misaligned.  Fix it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Set device type to wlan
Larry Finger [Tue, 22 Oct 2013 03:15:05 +0000 (22:15 -0500)]
staging: r8188eu: Set device type to wlan

The latest version of NetworkManager does not recognize the device as wireless
without this change.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> # [3.12+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: Remove OOM message after input_allocate_device
Joe Perches [Wed, 23 Oct 2013 19:14:53 +0000 (12:14 -0700)]
staging: Remove OOM message after input_allocate_device

Emitting an OOM message isn't necessary after input_allocate_device
as there's a generic OOM and a dump_stack already done.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: octeon: drop redundant mac address check
Luka Perkov [Tue, 29 Oct 2013 01:24:34 +0000 (02:24 +0100)]
staging: octeon: drop redundant mac address check

Checking if MAC address is valid using is_valid_ether_addr() is already done in
of_get_mac_address().

Signed-off-by: Luka Perkov <luka@openwrt.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: Fix WARNING: space prohibited before semicolon.
Kevin McKinney [Tue, 29 Oct 2013 03:51:38 +0000 (23:51 -0400)]
Staging: bcm: Fix WARNING: space prohibited before semicolon.

This patch removes a space before semicolon as
specified by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers: staging: bcm: Removed a developer debug statement.
Chuong Ngo [Wed, 23 Oct 2013 19:11:20 +0000 (15:11 -0400)]
drivers: staging: bcm: Removed a developer debug statement.

Removed a developer debug statement per the TODO list.  Additionally,
removed braces for the if-statement to match coding style.

Signed-off-by: Chuong Ngo <cngo.github@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStging: bcm: Adapter.h : removed typedef from struct _U_IP_ADDRESS and changed it...
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.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: winbond: Fix Sparse Warnings in reg.c
Ebru Akagunduz [Tue, 29 Oct 2013 08:14:34 +0000 (10:14 +0200)]
Staging: winbond: Fix Sparse Warnings in reg.c

This patch fixes the Sparse Warnings "symbol was
not declared. Should it be static?" and "defined
but not used [-Wunused-variable]"
in reg.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: winbond: Fix Sparse Warnings in phy_calibration.c
Ebru Akagunduz [Tue, 29 Oct 2013 08:08:46 +0000 (10:08 +0200)]
Staging: winbond: Fix Sparse Warnings in phy_calibration.c

This patch fixes Sparse Warnings "symbol was not
declared. Should it be static?" and "defined
but not used [-Wunused-function]" in
phy_calibration.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: use memdup_user to simplify code
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

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: status variables changed to int in ft1000_download.c
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.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: style issues fixed in write_blk
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.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: function write_dpram32_and_check extracted from write_blk
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.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: duplicate code replaced with call to request_code_segment
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>
10 years agostaging: ft1000: function request_code_segment extracted
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.

Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ft1000: function scram_start_dwnld extracted from scram_dnldr in ft1000_down...
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>
10 years agoStaging: ft1000: Fix assignment of bool to 0/1 in ft1000_dnld.c
Rashika Kheria [Sun, 27 Oct 2013 14:23:36 +0000 (19:53 +0530)]
Staging: ft1000: Fix assignment of bool to 0/1 in ft1000_dnld.c

This patch fixes the following warning in ft1000-pcmcia/ft1000_dnld.c-

drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c:307:6-18: WARNING: Assignment of bool to 0/1

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: ft1000: Fix comparsion of bool to 0/1 in ft1000_hw.c
Rashika Kheria [Sun, 27 Oct 2013 14:22:51 +0000 (19:52 +0530)]
Staging: ft1000: Fix comparsion 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:1924:9-25: WARNING: Comparison of bool to 0/1

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: ft1000: Fix assignment of bool to 0/1 in ft1000_hw.c
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

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: ft1000: Fix assignment of bool to non-0/1 constant in ft1000_download.c
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

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: ft1000: Fix assignment of bool to non-0/1 constant in ft1000_usb.c
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

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: dwc2: Fix return error value in dwc2_driver_probe()
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)?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: dwc2: Fix conditional statement since urb->actual_length is never less than...
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.

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: sbe-2t3e3: Fix smatch warning of function definition with external linkage
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

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192e: use memdup_user to simplify code
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

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: delete duplicated argument to |
Teodora Baluta [Fri, 25 Oct 2013 09:00:19 +0000 (12:00 +0300)]
staging: rtl8187se: delete duplicated argument to |

This patch fixes the following coccinelle issue for a mask calculation:

drivers/staging/rtl8187se/r8180_core.c:2552:44-54: duplicated argument to & or |

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: fix code allignment
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

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: bool tests don't need comparisons
Teodora Baluta [Fri, 25 Oct 2013 09:00:16 +0000 (12:00 +0300)]
staging: rtl8187se: bool tests don't need comparisons

This patch fixes the following coccinelle warning:

drivers/staging/rtl8187se/r8180_core.c:2217:5-40: WARNING: Comparison to bool

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: fix assignment of bool to 0/1
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

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: use memdup_user to simplify code
Teodora Baluta [Fri, 25 Oct 2013 09:00:14 +0000 (12:00 +0300)]
staging: rtl8187se: use memdup_user to simplify code

This patch fixes the following coccinelle warning to use memdup_user
rather than duplicating its implementation:

drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:2947:9-16: WARNING opportunity for memdup_user

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: sep: do not use comparisons on bool tests
Valentina Manea [Fri, 25 Oct 2013 08:48:29 +0000 (11:48 +0300)]
staging: sep: do not use comparisons on bool tests

This patch fixes coccinelle errors regarding comparisons
used in bool tests.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192e: do not use comparisons on bool tests
Valentina Manea [Fri, 25 Oct 2013 08:28:10 +0000 (11:28 +0300)]
staging: rtl8192e: do not use comparisons on bool tests

This patch fixes coccinelle errors regarding comparisons
used in bool tests.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: use memdup_user to simplify code
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

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8188eu: do not use comparisons on bool tests
Valentina Manea [Fri, 25 Oct 2013 08:39:56 +0000 (11:39 +0300)]
staging: rtl8188eu: do not use comparisons on bool tests

This patch fixes coccinelle errors regarding comparisons
used in bool tests.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: imx-drm: use true and false for bool variables
Valentina Manea [Fri, 25 Oct 2013 08:52:20 +0000 (11:52 +0300)]
staging: imx-drm: use true and false for bool variables

This patch fixes coccinelle errors for bool variables
initialized with 1 or 0 instead of true and false.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: et131x: Fix Smatch Warning of Buffer Overflow
Rashika Kheria [Thu, 24 Oct 2013 10:54:51 +0000 (16:24 +0530)]
Staging: et131x: Fix Smatch Warning of Buffer Overflow

This patch fixes the following Sparse Warning in et131x.c-

drivers/staging/et131x/et131x.c:2957 nic_send_packet() error: buffer overflow 'frags' 17 <= 21
drivers/staging/et131x/et131x.c:2959 nic_send_packet() warn: buffer overflow 'frags' 17 <= 21
drivers/staging/et131x/et131x.c:2961 nic_send_packet() error: buffer overflow 'frags' 17 <= 21

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: fix line over 80 characters in r8185b_init.c
Ebru Akagunduz [Thu, 24 Oct 2013 12:09:49 +0000 (15:09 +0300)]
Staging: rtl8187se: fix line over 80 characters in r8185b_init.c

Fix checkpatch.pl issues with line over 80 characters
in r8185b_init.c, Italian to English translated added

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: use netdev_warn instead of printk
Teodora Baluta [Mon, 21 Oct 2013 23:37:24 +0000 (02:37 +0300)]
staging: rtl8187se: use netdev_warn instead of printk

This patch fixes this type of checkpatch warnings:

WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then
pr_warn(...  to printk(KERN_WARNING ...

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: use netdev_info instead of printk
Teodora Baluta [Mon, 21 Oct 2013 23:37:23 +0000 (02:37 +0300)]
staging: rtl8187se: use netdev_info instead of printk

WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then
pr_info(...  to printk(KERN_INFO

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>