Georgiana Rodica Chelu [Sat, 24 Sep 2016 20:35:53 +0000 (23:35 +0300)]
staging: rtl8188eu: core: rtw_security: Remove return statement from void function
Remove the return statement from the end of a void function
to clean up the code.
Issue found by checkpatch.pl script.
Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Georgiana Rodica Chelu [Sat, 24 Sep 2016 20:35:20 +0000 (23:35 +0300)]
staging: rtl8188eu: core: rtw_mlme: Remove return statement from void function
Remove the return statement from the end of a void function
to clean up the code.
Issue found by checkpatch.pl script.
Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:14 +0000 (16:12 +0200)]
staging: rts5208: fix style warnings in xd.c
This patch fixes the following checkpatch.pl warning in xd.c:
WARNING: else is not generally useful after a break or return
It also makes code more uniform with the new changes
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:13 +0000 (16:12 +0200)]
staging: rts5208: fix style warnings in sd.c
This patch fixes the following checkpatch.pl warning in sd.c:
WARNING: else is not generally useful after a break or return
It also makes code more uniform with the new changes
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:12 +0000 (16:12 +0200)]
staging: rts5208: fix line style warnings in spi.c
This patch fixes the following checkpatch.pl warning in spi.c:
WARNING: line over 80 characters
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:11 +0000 (16:12 +0200)]
staging: rts5208: remove not used typedef in rtsx_sys.h
This patch fixes the following checkpatch.pl warning in rtsx_sys.h:
WARNING: do not add new typedefs
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:10 +0000 (16:12 +0200)]
staging: rts5208: fix comment blocks style in rtsx.h
This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:09 +0000 (16:12 +0200)]
staging: rts5208: fix comment blocks style in rtsx_chip.h
This patch fixes the following checkpatch.pl warning in rtsx_chip.h:
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:08 +0000 (16:12 +0200)]
staging: rts5208: avoid symbolic permissions in rtsx.c
This patch fixes the following checkpatch.pl warning in rtsx.c:
WARNING: Symbolic permissions are not preferred.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 14:12:07 +0000 (16:12 +0200)]
staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_t
This patch fixes the following checkpatch.pl warning in rtsx.h:
WARNING: do not add new typedefs
It also remove DELAY_PARA_T because code is not using it.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 13:45:20 +0000 (15:45 +0200)]
staging: wlan-ng: avoid new typedef: p80211pstr_t
This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs
It applies for typedef p80211pstr_t
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 13:45:19 +0000 (15:45 +0200)]
staging: wlan-ng: avoid new typedef: p80211enum_t
This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs
It applies for typedef p80211enum_t.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Fri, 23 Sep 2016 13:45:17 +0000 (15:45 +0200)]
staging: wlan-ng: avoid new typedef: p80211enumpair_t
This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs
It applies for typedef p80211enumpair_t.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christopher Pezley [Sat, 24 Sep 2016 16:51:58 +0000 (18:51 +0200)]
staging: ion: Align cases with switch
The preferred indentation for cases and switches has the cases at
the same level as the switch.
Signed-off-by: Christopher H. Pezley <chris@pezley.net>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Antti Keränen [Fri, 23 Sep 2016 18:03:05 +0000 (21:03 +0300)]
staging: ion: Fix a coding style issue
This patch fixes the alignment of an allocation flag block comment
and moves the comments before each #define.
Signed-off-by: Antti Keränen <detegr@gmail.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Georgiana Rodica Chelu [Sat, 24 Sep 2016 19:49:02 +0000 (22:49 +0300)]
staging: ks7010: ks_wlan_net: Remove return statement from void function
Remove the return statement from the end of a void function
to clean up the code.
Issue found by checkpatch.pl script.
Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Georgiana Rodica Chelu [Fri, 23 Sep 2016 19:45:25 +0000 (22:45 +0300)]
staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value
Remove unneeded code in order to make clear
that the function returns 0(success) in all cases.
Done using returnvar.cocci script.
Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baoyou Xie [Fri, 23 Sep 2016 13:21:33 +0000 (21:21 +0800)]
Staging: ks7010: remove unused function in ks_wlan_net.c
We get 1 warning when building kernel with W=1:
drivers/staging/ks7010/ks_wlan_net.c:3520:5: warning: no previous prototype for 'ks_wlan_reset' [-Wmissing-prototypes]
In fact, these functions are unused in
ks_wlan_net.c, but should be removed.
So this patch removes the unused function.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baoyou Xie [Fri, 23 Sep 2016 13:35:22 +0000 (21:35 +0800)]
staging: rtl8192u: remove unused functions in r8192U_core.c
We get 2 warnings when building kernel with W=1:
drivers/staging/rtl8192u/r8192U_core.c:925:12: warning: no previous declaration for 'ieeerate2rtlrate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:958:12: warning: no previous declaration for 'rtl8192_rate2rate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:1322:11: warning: no previous declaration for 'rtl8192_IsWirelessBMode' [-Wmissing-declarations]
In fact, these functions are unused in
r8192U_core.c, but should be removed.
So this patch removes the unused functions.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baoyou Xie [Fri, 23 Sep 2016 13:31:18 +0000 (21:31 +0800)]
staging: rtl8192u: ieee80211: ieee80211_softmac: mark symbols static where possible
We get 5 warnings when building kernel with W=1:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:287:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:323:24: warning: no previous declaration for 'ieee80211_probe_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:643:24: warning: no previous declaration for 'ieee80211_authentication_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:981:24: warning: no previous declaration for 'ieee80211_association_req' [-Wmissing-declarations]
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3094:24: warning: no previous declaration for 'ieee80211_disassociate_skb' [-Wmissing-declarations]
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Baoyou Xie [Fri, 23 Sep 2016 13:13:35 +0000 (21:13 +0800)]
staging: android: ion: mark symbols static where possible
We get 4 warnings when building kernel with W=1:
drivers/staging/android/ion/ion_carveout_heap.c:36:17: warning: no previous prototype for 'ion_carveout_allocate' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_carveout_heap.c:50:6: warning: no previous prototype for 'ion_carveout_free' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_of.c:28:5: warning: no previous prototype for 'ion_parse_dt_heap_common' [-Wmissing-prototypes]
drivers/staging/android/ion/ion_of.c:54:5: warning: no previous prototype for 'ion_setup_heap_common' [-Wmissing-prototypes]
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
so this patch marks these functions with 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Fri, 23 Sep 2016 13:20:02 +0000 (15:20 +0200)]
staging: most: aim-cdev: make syscall write accept buffers of arbitrary size
This patch allows to call the write() function for synchronous and
isochronous channels with buffers of any size. The AIM simply waits for
data to fill up the MOST buffer object according to the network interface
controller specification for streaming channels, before it submits the
buffer to the HDM.
The new behavior is backward compatible to the old applications, since
all known applications needed to fill the buffer completely anyway.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Thu, 22 Sep 2016 16:39:06 +0000 (22:09 +0530)]
staging: greybus: Use setup_timer function
This patch uses setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jannik Becher [Thu, 22 Sep 2016 23:02:10 +0000 (01:02 +0200)]
staging: wlan-ng: remove unnecessary spaces before casts
Fixed a coding style issue by removing unnecessary spaces before casts.
Signed-off-by: Jannik Becher <Becher.Jannik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johan Svensson [Thu, 22 Sep 2016 18:11:21 +0000 (20:11 +0200)]
staging: ks7010: add blank line after variable declarations
Fixes warnings found by checkpatch
Missing a blank line after declarations
Signed-off-by: Johan Svensson <johan.svensson692@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Thu, 22 Sep 2016 14:59:22 +0000 (21:59 +0700)]
staging: r8188eu: remove RFType member of odm_dm_struct structure
rf_type is always equal to ODM_1T1R.
So, only RF PATH A exists for r8188eu device...
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Thu, 22 Sep 2016 14:58:43 +0000 (21:58 +0700)]
staging: r8188eu: remove rf_type member of hal_data_8188e structure
rf_type is always equal to RF_1T1R.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Georgiana Rodica Chelu [Fri, 23 Sep 2016 06:14:27 +0000 (09:14 +0300)]
staging: rtl8188eu: hal: rtl8188e_cmd: Use ether_addr_copy() instead of memcpy()
The checkpatch.pl found the warning:
WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)
Checked if the the Ethernet addresses are __aligned(2) by using pahole
tool. The type of pwlanhdr is struct ieee80211_hdr and pahole shows that
addr1, addr2, and addr3 are aligned to u16.
struct ieee80211_hdr {
__le16 frame_control; /* 0 2 */
__le16 duration_id; /* 2 2 */
u8 addr1[6]; /* 4 6 */
u8 addr2[6]; /* 10 6 */
u8 addr3[6]; /* 16 6 */
__le16 seq_ctrl; /* 22 2 */
u8 addr4[6]; /* 24 6 */
/* size: 30, cachelines: 1, members: 7 */
/* last cacheline: 30 bytes */
};
Both eeprompriv from struct adapter and MacAddress from struct
wlan_bssid_ex have the offset multiple of sizeof(u16).
Also, the array bc_addr and the pointers: StaAddr, mac, and bssid,
start from an even offset.
Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juliana Rodrigues [Fri, 23 Sep 2016 03:21:55 +0000 (00:21 -0300)]
staging: lustre: llite: removed uneeded return variables
Removed variables used only for return purposes and replaced them for
the return value itself. Found using Coccinelle's semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juliana Rodrigues [Thu, 22 Sep 2016 21:09:28 +0000 (18:09 -0300)]
staging: wlan-ng: removed blank lines
Removed an unecessary blank line after open brace, fixing a checkpatch
issue.
Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Thu, 22 Sep 2016 15:33:33 +0000 (23:33 +0800)]
staging: greybus: arche-apb-ctrl: declare struct of_device_id as const
Declare the 'arche_apb_ctrl_of_match' array as const. This array is only stored
in the .of_match_table field of a device_driver structure, which is declared as
const. This addresses the checkpatch warning:
WARNING: struct of_device_id should be normally const
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Thu, 22 Sep 2016 15:33:34 +0000 (23:33 +0800)]
staging: greybus: arche-platform: declare struct of_device_id as const
Declare the arrays 'arche_platform_of_match' and 'arche_combined_id' as const.
'arche_platform_of_match' is only stored in the .of_match_table field of a
device_driver structure, which is declared as const.
'arche_combined_id' is passed to MODULE_DEVICE_TABLE. This macro does not
modify the array and therefore the array can be declared as const. Checkpatch
pointed out both issues.
WARNING: struct of_device_id should be normally const
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Thu, 22 Sep 2016 09:57:30 +0000 (15:27 +0530)]
Staging: speakup: kobjects: Add space around the operator.
This issue was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Thu, 22 Sep 2016 09:53:55 +0000 (15:23 +0530)]
Staging: speakup: varhandlers: Add space around the operator.
This patch was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Wed, 21 Sep 2016 18:36:51 +0000 (00:06 +0530)]
staging: slicoss: Move NULL test closer to assignment
Move the test to check if a variable is NULL, to right after it is being
assigned, rather than some statements later.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Wed, 21 Sep 2016 18:17:55 +0000 (23:47 +0530)]
staging: ks7010: Remove unnecessary variable used to store return value
This patch removes an unnecessary variable used to store return values
in order to reduce memory usage.
Done using coccinelle:
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
return
- ret
+ C
;
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Wed, 21 Sep 2016 18:08:00 +0000 (23:38 +0530)]
staging: octeon-usb: Remove unnecessary assignment
Remove 'x=a;' from a consecutive double assignment of the form 'x=a; x=b;'.
Issue detected by the semantic patch found here:
https://github.com/coccinelle/coccinellery/blob/master/write2/write2.cocci
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yannis Damigos [Wed, 21 Sep 2016 17:24:54 +0000 (20:24 +0300)]
Staging:rtl8188eu: Fix multiple blank lines
This patch fixes multiple black lines issue found by checkpatch.pl
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 13:11:18 +0000 (18:41 +0530)]
staging: sm750fb: Remove unnecessary parentheses
Remove unnecessary parentheses from right side of an assignment. Issue
detected by the following Coccinelle semantic patch:
@r@
identifier x;
expression e1, e2;
@@
- x = (e1 << e2);
+ x = e1 << e2;
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 12:06:29 +0000 (17:36 +0530)]
staging: sm750fb: Use BIT(x) macro
Replaces left shift operation (1 << d) by BIT(x) macro.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 14:10:14 +0000 (19:40 +0530)]
staging: xgifb: Remove unused variable and if statement
Setting the variable 'refresh_rate = 60;' has no use to the rest of the
function. Hence the if statement setting it and the variable itself can be
removed. This was detected using the following Coccinelle semantic patch:
@@
type T;
identifier i;
constant C;
@@
(
extern T i;
|
- T i;
<+... when != i
- i = C;
...+>
)
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Wed, 21 Sep 2016 22:13:20 +0000 (15:13 -0700)]
staging: speakup: Remove unnecessary parentheses
Issue found by checkpatch.
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Lin [Thu, 22 Sep 2016 01:57:23 +0000 (18:57 -0700)]
staging: greybus: add maintainer for uart and log protocol drivers
Add myself as greybus uart and log protocol driver maintainer.
Signed-off-by: David Lin <dtwlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 22 Sep 2016 01:56:44 +0000 (10:56 +0900)]
staging: greybus: uart.c: fix alignment to match open parenthesis
Fixes checkpatch.pl warning:
CHECK: Alignment should match open parenthesis
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 22 Sep 2016 01:56:43 +0000 (10:56 +0900)]
staging: greybus: uart.c: change 'unsigned' to 'unsigned int'
Fixes checkpatch.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Richard Groux [Wed, 21 Sep 2016 17:05:31 +0000 (19:05 +0200)]
staging: greybus: audio_codec.c: code indent should use tabs where possible
Minor error spotted by checkpatch.pl in greybus
code indent should use tabs where possible
Signed-off-by: Richard Groux <rgroux@sauron-mordor.net>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Richard Groux [Wed, 21 Sep 2016 17:05:29 +0000 (19:05 +0200)]
staging: greybus: audio_codec.c: space required before the open brace
Minor error spotted by checkpatch.pl in greybus
space required before the open brace '{'
Signed-off-by: Richard Groux <rgroux@sauron-mordor.net>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Wed, 21 Sep 2016 05:07:04 +0000 (13:07 +0800)]
staging: greybus: arche-platform: compress return logic into one line
Modify return statement to use the value being returned directly instead of
assigning it first to 'ret' and returning this variable. Coccinelle semantic
patch used:
@@
expression e;
local idexpression ret;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Wed, 21 Sep 2016 05:03:24 +0000 (13:03 +0800)]
staging: greybus: audio: delete unnecessary parentheses
Eliminate unneeded parentheses around the right hand side of an assignment.
Coccinelle semantic patch used:
@@
expression e1, e2;
identifier v;
@@
(
v = (e1 == e2)
|
v = (e1 != e2)
|
v = (e1 <= e2)
|
v = (e1 >= e2)
|
v =
- (
e1
- )
)
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Wed, 21 Sep 2016 04:59:29 +0000 (12:59 +0800)]
staging: greybus: camera: simplify NULL test
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency.
Coccinelle semantic patch used:
@@
identifier func;
expression x;
statement Z;
@@
x = func(...);
if (
(
+ !
x
- == NULL
|
+ !
- NULL ==
x
)
) Z
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrey Shvetsov [Wed, 21 Sep 2016 12:49:10 +0000 (14:49 +0200)]
staging: most: replace MOST_CH_ISOC_AVP with MOST_CH_ISOC
This patch replaces the enum value MOST_CH_ISOC_AVP with the more
appropriate MOST_CH_ISOC.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Wed, 21 Sep 2016 12:49:09 +0000 (14:49 +0200)]
staging: most: clean up configuration strings
This patch adds the strings 'rx', 'tx' and 'isoc' to the list of accepted
identifiers when setting up a channel configuration. To keep consistency it
removes the prefix "dir_" from strings returned by the attributes
set_direction and available_directions and it removes the suffix "_avp"
from the string "isoc_avp" returned by the attributes set_datatype and
available_datatypes.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrey Shvetsov [Wed, 21 Sep 2016 12:49:08 +0000 (14:49 +0200)]
staging: most: core: remove trailing zero from text property
This patch removes trailing zeros from the strings returned by the
attributes available_datatypes and available_directions.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Wed, 21 Sep 2016 12:49:05 +0000 (14:49 +0200)]
staging: most: make function most_submit_mbo return void
Function most_submit_mbo() causes an exception only if either the pointer
mbo or mbo->context equals NULL. From the underlying architecture's point
of view both cases must _not_ come true and would happen only, if something
has tampered with the pointers. This would render runtime code unable to
recover anyway. So, instead trying to hide that things are already
critically out of control we're better off with a WARN_ON() assertion.
This patch replaces the return type of the function most_submit_mbo() with
'void' and adds a WARN_ONCE() assertion. Additionally, code calling the
function is adapted accordingly.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juliana Rodrigues [Thu, 22 Sep 2016 03:24:40 +0000 (00:24 -0300)]
staging: wlan-ng: fixed block comment formatting
This patch fixes a checkpatch warning in
a block comment by adapting it to the community
preferred coding style.
Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juliana Rodrigues [Thu, 22 Sep 2016 05:49:50 +0000 (02:49 -0300)]
staging: wlan-ng: fixed alignment not matching
This patch fixes a checkpatch warning by moving
arguments to the right and aligning them to their open
parenthesis.
Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juliana Rodrigues [Thu, 22 Sep 2016 05:50:56 +0000 (02:50 -0300)]
staging: wlan-ng: fixed parenthesis alignment
This patch fixes a checkpatch warning by moving
arguments to the right and aligning them to the open
parenthesis above.
Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juliana Rodrigues [Thu, 22 Sep 2016 06:01:28 +0000 (03:01 -0300)]
staging: wlan-ng: fixed block comment trailing
Moved trailing */ to a new line and added * to subsequent lines on a
block comment.
Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaibhav Hiremath [Wed, 21 Sep 2016 10:58:13 +0000 (16:28 +0530)]
staging: greybus: add maintainer for greybus platform drivers
Add Vaibhav Hiremath as a Maintainer of Greybus platform
drivers.
Signed-off-by: Vaibhav Hiremath <hvaibhav.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 21 Sep 2016 10:35:13 +0000 (12:35 +0200)]
staging: greybus: fix up camera Kconfig dependancies
CONFIG_MEDIA is not a thing, but CONFIG_MEDIA_SUPPORT is, so use that.
Reported-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 20:29:02 +0000 (16:29 -0400)]
staging: unisys: include: remove unused ULTRA_CHANNELCLI_STRING
The inline ULTRA_CHANNELCLI_STRING is not being used so remove it.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 20:29:01 +0000 (16:29 -0400)]
staging: unisys: include: remove unused spar_channel_client_release_os
The function spar_channel_client_release_os is not being
used so remove it.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 20:29:00 +0000 (16:29 -0400)]
staging: unisys: include: remove unused spar_channel_client_acquire_os
The function spar_channel_client_acquire_os is not being used so
remove it.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 20:28:59 +0000 (16:28 -0400)]
staging: unisys: include: remove unused function pathname_last_n_nodes
The function pathname_last_n_nodes is not used, get rid of it.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 17:14:05 +0000 (13:14 -0400)]
staging: unisys: visorhba: remove prototypes for visorhba_main.c
Remove not needed prototypes in visorhba.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 15:42:06 +0000 (11:42 -0400)]
staging: unisys: visornic: remove poll_for_irq prototype
Remove poll_for_irq prototype not needed.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 15:42:05 +0000 (11:42 -0400)]
staging: unisys: visornic: remove visornic_poll prototype
Remove visornic_poll prototype, because it is not needed.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 15:42:04 +0000 (11:42 -0400)]
staging: unisys: visornic: remove visornic debugfs protoyptes
Remove visornic debugfs prototypes, they are not needed.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Tue, 20 Sep 2016 15:42:03 +0000 (11:42 -0400)]
staging: unisys: visornic: remove prototypes
Remove unneeded prototypes from visornic_main.c
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaibhav Agarwal [Wed, 21 Sep 2016 08:47:05 +0000 (14:17 +0530)]
staging: greybus: add maintainer for greybus audio protocol driver
Add Vaibhav as maintainer of some Greybus Audio protocol drivers.
Signed-off-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Tue, 20 Sep 2016 17:31:09 +0000 (13:31 -0400)]
staging: lustre: ptlrpc: re-export lustre_swab_lov_mds_md
Being over zealous in removing unused EXPORT_SYMBOLs the function
lustre_swab_lov_mds_md exports were removed. They need to be
exported so this patch restores those EXPORT_SYMBOLS. Same
mistake was done when porting to the upstream client.
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/14545
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6486
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Viresh Kumar [Wed, 21 Sep 2016 06:40:16 +0000 (12:10 +0530)]
staging: greybus: add Viresh as maintainer of few greybus protocol drivers
Add Viresh Kumar as Maintainer of some of the Greybus protocol drivers.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 11:16:24 +0000 (16:46 +0530)]
staging: rts5208: Remove space after cast
Removes unnecessary space after a cast. Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 11:16:05 +0000 (16:46 +0530)]
staging: rts5208: Use BIT(x) macro
Replaces left shift operation (1 << x) by BIT(x). Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 11:15:48 +0000 (16:45 +0530)]
staging: rts5208: Put constant on right side of comparison
Replaces position of constant from left to right side of a comparison.
Additionally, modifies logical continuations to be on the previous line and
fixes alignment to match open parenthesis. Issues found by checkpatch.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 11:15:33 +0000 (16:45 +0530)]
staging: rts5208: Fix indentation
Fixes indentation by removing unnecessary TAB. Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 11:15:04 +0000 (16:45 +0530)]
staging: rts5208: Add spaces around operators
Adds spaces on either side of arithmetic and relational operators like
'-', '<' and '*'. Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 11:14:51 +0000 (16:44 +0530)]
staging: rts5208: Remove unnecessary parentheses
Removes unnecessary parentheses from an expression of the form &(x).
Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Mon, 19 Sep 2016 21:51:38 +0000 (03:21 +0530)]
staging: comedi: Use vma_pages function on vma object instead of explicit computation
This patch uses vma_pages function on vma object instead of explicit
computation.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Mon, 19 Sep 2016 12:14:43 +0000 (17:44 +0530)]
Staging: vt6655: baseband: Remove unnecessary space after a cast
No space is necessary after a cast. This issue was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Mon, 19 Sep 2016 12:17:21 +0000 (17:47 +0530)]
Staging: vt6655: card: Remove unnecessary space after a cast
No space is necessary after a cast. This issue was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Mon, 19 Sep 2016 13:56:32 +0000 (19:26 +0530)]
staging: sm750fb: Add spaces around '|'
Adds spaces on either side of a '|'. Issue found by checkpatch.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Mon, 19 Sep 2016 19:35:54 +0000 (01:05 +0530)]
staging: wlan-ng: Remove unnecessary variable usage
Instead of storing the return value into a variable and then returning it, we
can club the two into a single return statement. This change was made using
the following semantic patch by Coccinelle:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Tue, 20 Sep 2016 03:09:05 +0000 (11:09 +0800)]
staging: most: hdm-usb: convert pr_warn() to dev_warn()
Replace pr_warn() call with its respective dev_warn() counterpart.
Semantic patch used to detect and apply the transformation:
@a@
identifier dev;
expression E;
@@
struct device *dev = E;
<+... when != dev == NULL
- pr_warn(
+ dev_warn(dev,
...);
...+>
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eva Rachel Retuya [Tue, 20 Sep 2016 07:00:49 +0000 (15:00 +0800)]
staging: media: cxd2099: replace printk with dev_info
Use dev_info() instead of printk(). Majority of the conversion was done
previously on this commit:
011b2aa [media] staging/media: Use dev_ printks in cxd2099/cxd2099.[ch]
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 08:00:24 +0000 (13:30 +0530)]
staging: media: bcm2048: Merge assignment with return
Instead of storing the return value into a variable and then returning it, we
can club the two into a single return statement. This change was made using
the following semantic patch by Coccinelle:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rehas Sachdeva [Tue, 20 Sep 2016 08:00:47 +0000 (13:30 +0530)]
staging: media: davinci_vpfe: Merge assignment with return
Instead of storing the return value into a variable and then returning it, we
can club the two into a single return statement. This change was made using
the following semantic patch by Coccinelle:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Mon, 19 Sep 2016 11:30:16 +0000 (17:00 +0530)]
Staging: rts5208: Add space around operator.
Add space around operator. This patch was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Mon, 19 Sep 2016 09:15:04 +0000 (14:45 +0530)]
Staging: rts5208: rtsx: Use x instead of x != NULL.
Use x instead of x != NULL. This patch was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Mon, 19 Sep 2016 09:12:24 +0000 (14:42 +0530)]
Staging: rts5208: ms: Use x instead of x != NULL.
Use x instead of x != NULL. This patch was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cathal Mullaney [Sun, 18 Sep 2016 19:08:45 +0000 (20:08 +0100)]
Staging: rts5208: rtsx_card.c: Fixed brace style issues
Fixed several minor brace coding style issues.
Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Tue, 20 Sep 2016 07:41:39 +0000 (13:11 +0530)]
Staging: ks7010: michael_mic: Use "foo *bar" instead of "foo * bar".
This issue was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Tue, 20 Sep 2016 07:39:58 +0000 (13:09 +0530)]
Staging: ks7010: Use "foo *bar" instead of "foo * bar".
This issue was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Tue, 20 Sep 2016 06:45:15 +0000 (12:15 +0530)]
Staging: ks7010: Use "foo *bar" instead of "foo * bar"
This patch was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Tue, 20 Sep 2016 06:25:47 +0000 (11:55 +0530)]
Staging: ks7010: Use sizeof structure *pointer over sizeof structure in kzalloc()
This issue was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Sun, 18 Sep 2016 20:16:34 +0000 (01:46 +0530)]
staging: ks7010: Remove unnecessary variable used to store return value
This patch removes an unnecessary variable used to store return values in order
to reduce memory usage.
Done using coccinelle:
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
return
- ret
+ C
;
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hariharan R [Mon, 19 Sep 2016 00:16:03 +0000 (20:16 -0400)]
staging: ks7010: fixes typo in ks_hostif.c
Fixes typo,
FAILUER -> FAILURE
Recieve -> Receive
Signed-off-by: Hariharan R <hariharanrangasamy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Sat, 17 Sep 2016 23:37:21 +0000 (05:07 +0530)]
Staging: fsl-mc: Use !x instead of x == NULL.
Use !x instead of x == NULL. This issue was found by checkpatch.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sandhya Bankar [Sun, 18 Sep 2016 17:32:33 +0000 (23:02 +0530)]
Staging: octeon: Add missing of_node_put after calling of_parse_phandle.
of_node_put needs to be called when the device node which is got
from of_parse_phandle is no longer used.
This patch is found by below coccinelle script:
@@
expression e,e1,e2;
@@
*e = of_parse_phandle(...)
... when != of_node_put(e)
when != true e == NULL
when != e2 = e
e = e1
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Mon, 19 Sep 2016 14:32:40 +0000 (20:02 +0530)]
staging: i4l: act2000: Move assignment out of if statement
This patch places assignments which are inside the if condition, above it.
Done using coccinelle:
@@
statement s;
expression e;
identifier id;
@@
- if ((id = e))
+ id = e;
+ if (id)
s
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>