openwrt/staging/blogic.git
5 years agostaging: rtl8723bs: hal: hal_com.c: Remove unnecessary parentheses
Payal Kshirsagar [Sat, 30 Mar 2019 05:12:42 +0000 (10:42 +0530)]
staging: rtl8723bs: hal: hal_com.c: Remove unnecessary parentheses

Challenge suggested by coccinelle.
Remove unnecessary parentheses around expressions.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_phycfg.c: Remove unnecessary parentheses
Payal Kshirsagar [Sat, 30 Mar 2019 05:12:41 +0000 (10:42 +0530)]
staging: rtl8723bs: hal: rtl8723b_phycfg.c: Remove unnecessary parentheses

Challenge suggested by coccinelle.
Remove unnecessary parentheses around an expression.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_ops.c: Remove unnecessary parentheses
Payal Kshirsagar [Sat, 30 Mar 2019 05:12:40 +0000 (10:42 +0530)]
staging: rtl8723bs: hal: sdio_ops.c: Remove unnecessary parentheses

Challenge suggested by coccinelle.
Remove unnecessary parentheses around expressions.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove unnecessary parentheses
Vatsala Narang [Fri, 29 Mar 2019 20:25:09 +0000 (01:55 +0530)]
staging: rtl8723bs: core: Remove unnecessary parentheses

Removes unnecessary parentheses while returning an expression.Issue
found using coccinelle.
Semantic patch used to solve the problem is as follows:

@@
expression e;
@@

return
-(
e
-)
;

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Fix a comparison warning.
Vatsala Narang [Fri, 29 Mar 2019 22:48:25 +0000 (04:18 +0530)]
staging: rtl8723bs: core: Fix a comparison warning.

Move the constant to the right side of comparison to get rid of
checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Fix a space issue
Vatsala Narang [Sat, 30 Mar 2019 01:13:43 +0000 (06:43 +0530)]
staging: rtl8712: Fix a space issue

Remove unnecessary space after a cast to get rid of checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: media: zoran: Fix block comment style
Vatsala Narang [Sat, 30 Mar 2019 01:41:51 +0000 (07:11 +0530)]
staging: media: zoran: Fix block comment style

Add trailing */ on a separate line for block comments to get rid of
checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: Remove unnecessary parentheses
Payal Kshirsagar [Sat, 30 Mar 2019 05:39:36 +0000 (11:09 +0530)]
staging: rtlwifi: Remove unnecessary parentheses

Challenge suggested by coccinelle.
Remove unnecessary parentheses around the right hand side of an
assignment.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: media: davinci_vpfe: Convert macro 'IPIPE_S12Q8' into inline
Madhumitha Prabakaran [Fri, 29 Mar 2019 16:48:51 +0000 (11:48 -0500)]
Staging: media: davinci_vpfe: Convert macro 'IPIPE_S12Q8' into inline

Convert macro 'IPIPE_S12Q8' into an inline function to maintain Linux
kernel coding style based on which inline function is preferable to
macro resembling function.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: rtl8192u: ieee80211: Remove custom macro IEEE80211_DEBUG
Madhumitha Prabakaran [Fri, 29 Mar 2019 16:55:29 +0000 (11:55 -0500)]
Staging: rtl8192u: ieee80211: Remove custom macro IEEE80211_DEBUG

Remove the custom macro IEEE80211_DEBUG for printing message in
dev_alloc_skb in order to maintain Linux kernel coding style based on
which kernel does not print failure warning.

Issue suggested by Coccinelle

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove unnecessary parentheses
Payal Kshirsagar [Fri, 29 Mar 2019 18:36:06 +0000 (00:06 +0530)]
staging: rtl8723bs: Remove unnecessary parentheses

Challenge suggested by coccinelle.
Remove unnecessary parentheses around expressions and add spaces around operator.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: greybus: audio_manager: fix a missing check of ida_simple_get
Kangjie Lu [Thu, 14 Mar 2019 06:45:24 +0000 (01:45 -0500)]
staging: greybus: audio_manager: fix a missing check of ida_simple_get

ida_simple_get could fail. The fix inserts a check for its
return value.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mediatek: addres minor style issues flagged by clang-format.
Armando Miraglia [Sun, 17 Mar 2019 08:44:45 +0000 (09:44 +0100)]
staging: mediatek: addres minor style issues flagged by clang-format.

Running clang-format on mtk-hsdma.c I noticed that few lines would not
need to be wrapped, since they fit 80 columns. This change changes such
lines to better fit the style-guide.

Signed-off-by: Armando Miraglia <armax@google.com>
Acked-by: Sean Wang <sean.wang@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-pci-phy: change driver to don't use child nodes
Sergio Paracuellos [Fri, 29 Mar 2019 05:52:43 +0000 (06:52 +0100)]
staging: mt7621-pci-phy: change driver to don't use child nodes

Device tree has been simplified to don't use child nodes and use
the #phy-cells property instead. Change the driver accordly implementing
custom 'xlate' function to return the correct phy for each port.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-pci-phy: update bindings documentation
Sergio Paracuellos [Fri, 29 Mar 2019 05:52:42 +0000 (06:52 +0100)]
staging: mt7621-pci-phy: update bindings documentation

Device tree has been simplified to use phy-cells instead of
using child nodes. Update documentation accordly.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-dts: simplify pcie phy bindings
Sergio Paracuellos [Fri, 29 Mar 2019 05:52:41 +0000 (06:52 +0100)]
staging: mt7621-dts: simplify pcie phy bindings

If each phy port doesn't have its own resources, then we don't need
child nodes. Handle it using #phy-cells to 1 for both phy's.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: phydm: phydm_adc_sampling.c Remove brackets
Nishka Dasgupta [Thu, 28 Mar 2019 19:30:40 +0000 (01:00 +0530)]
staging: rtlwifi: phydm: phydm_adc_sampling.c Remove brackets

Remove parentheses around right hand side of expression. Issue found
with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: phydm: phydm_hwconfig.c: Remove parentheses
Nishka Dasgupta [Thu, 28 Mar 2019 19:30:39 +0000 (01:00 +0530)]
staging: rtlwifi: phydm: phydm_hwconfig.c: Remove parentheses

Remove parentheses around right hand side of expression. Issue found
with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtlwifi: Remove return variable.
Sanjana Sanikommu [Thu, 28 Mar 2019 16:35:22 +0000 (22:05 +0530)]
staging: rtlwifi: Remove return variable.

Remove return variable and return "return" value directly. Issue found by
Coccinelle using ret.cocci.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: gasket: apex: Prefer using the BIT macro
Sanjana Sanikommu [Thu, 28 Mar 2019 14:34:24 +0000 (20:04 +0530)]
staging: gasket: apex: Prefer using the BIT macro

Challenge suggested by coccinelle.

Replace bit shifting on 1 with the BIT(x) macro.
Coccinelle script:

@@
constant c;
@@

-(1 << c)
+BIT(c)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192u: ieee80211: Use !x in place of NULL comparison
Vatsala Narang [Thu, 28 Mar 2019 19:09:43 +0000 (00:39 +0530)]
staging: rtl8192u: ieee80211: Use !x in place of NULL comparison

Change NULL comparison to Boolean negation.Issue found using Coccinelle

Semantic patch used to solve the problem is as follows:

@replace_rule@
expression e;
@@

- e == NULL
+ !e

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: rtl8192u: Use BIT macro
Madhumitha Prabakaran [Thu, 28 Mar 2019 15:53:33 +0000 (10:53 -0500)]
Staging: rtl8192u: Use BIT macro

Use BIT macro, as kernel provides the macro for improving uniform
and more readable way to define these constants.

Issue suggested by Coccinelle.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192u: ieee80211: ieee80211_wx: add space before open brace
Julius Hemanth Pitti [Wed, 27 Mar 2019 22:40:17 +0000 (15:40 -0700)]
staging: rtl8192u: ieee80211: ieee80211_wx: add space before open brace

Fix checkpatch error "ERROR: space required before the open brace
'{'" in ieee80211_wx.c.

Signed-off-by: Julius Hemanth Pitti <juliushemanth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: assign scan result callback before starting the scan
Adham Abozaeid [Wed, 27 Mar 2019 20:28:34 +0000 (20:28 +0000)]
staging: wilc1000: assign scan result callback before starting the scan

When scan is triggered, sometimes scan results are received before the scan
result callback is assigned, causing the recieved results to be ignored.

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192e: Remove unnecessary parentheses.
Sanjana Sanikommu [Wed, 27 Mar 2019 16:39:30 +0000 (22:09 +0530)]
staging: rtl8192e: Remove unnecessary parentheses.

Challenge suggested by coccinelle.
Remove unnecessary parentheses around the right hand of
assignment using the below script.

@@
local idexpression id;
expression e;
@@

id =
-(
e
-)

@@ expression e, e1, e2,e3,e4; @@
e =
-(((e1) & (e2)) |
-(e3 << e4))
+(e1 & e2) |
+(e3 << e4)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: ni_tio: Use data[insn->n-1] in ni_tio_insn_write()
Ian Abbott [Wed, 27 Mar 2019 15:15:15 +0000 (15:15 +0000)]
staging: comedi: ni_tio: Use data[insn->n-1] in ni_tio_insn_write()

The `insn_write` handler for the counter subdevices
(`ni_tio_insn_write()`) writes a single data value `data[0]` to the
channel.  Technically, `insn->n` specifies the number of successive
values from `data[]` to write to the channel, but when there is little
benefit in writing multiple data values, the usual Comedi convention is
to just write the last data value `data[insn->n - 1]`.  Change the
function to follow that convention and use `data[insn->n - 1]` instead
of `data[0]`.  (In practice, `insn->n` would normally be 1 anyway.)

Also follow the usual Comedi convention and return `insn->n` from the
handler to indicate success instead of 0 (although any non-negative
return value will do).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: pi433: Fix rf69_set_tx_cfg() logic
Sidong Yang [Thu, 28 Mar 2019 09:49:14 +0000 (09:49 +0000)]
staging: pi433: Fix rf69_set_tx_cfg() logic

Moved code to configure sync to where check enable_sync option before.
There is no need to check enable_sync twice. Configuring sync should be
executed immediately after enabling sync.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: media: ipu3: Avoid unnecessary blank line.
Sanjana Sanikommu [Thu, 28 Mar 2019 18:06:32 +0000 (23:36 +0530)]
staging: media: ipu3: Avoid unnecessary blank line.

Remove unnecessary blank line.
Issue found using checkpatch.pl

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Initialize completions a single time during probe
George Hilliard [Wed, 27 Mar 2019 01:50:57 +0000 (19:50 -0600)]
staging: mt7621-mmc: Initialize completions a single time during probe

The module was initializing completions whenever it was going to wait on
them, and not when the completion was allocated.  This is incorrect
according to the completion docs:

    Calling init_completion() on the same completion object twice is
    most likely a bug [...]

Re-initialization is also unnecessary because the module never uses
complete_all().  Fix this by only ever initializing the completion a
single time, and log if the completions are not consumed as intended
(this is not a fatal problem, but should not go unnoticed).

Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Remove obsolete Kconfig flags
George Hilliard [Wed, 27 Mar 2019 01:50:56 +0000 (19:50 -0600)]
staging: mt7621-mmc: Remove obsolete Kconfig flags

These values are not referred to anywhere else in the kernel. Card
detect is controlled by the device tree property "mediatek,cd-poll",
and there is no driver support for eMMC whatsoever.

Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: fix line over 80 characters warning
Anirudh Rayabharam [Tue, 26 Mar 2019 18:25:07 +0000 (23:55 +0530)]
staging: rtl8723bs: core: fix line over 80 characters warning

Shorten the expression by re-using the part that was already computed to
fix the line over 80 characters warning reported by checkpatch.pl.

Signed-off-by: Anirudh Rayabharam <anirudh.rayabharam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: emxx_udc: remove unneeded parenthesis
Emiliano Ingrassia [Mon, 25 Mar 2019 22:57:19 +0000 (23:57 +0100)]
staging: emxx_udc: remove unneeded parenthesis

Fix 5 warnings detected by checkpatch.pl about unneeded parenthesis
around conditions tests.

Signed-off-by: Emiliano Ingrassia <ingrassia.emiliano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: use cfg80211 ssid list instead of repacking it
Adham Abozaeid [Mon, 25 Mar 2019 22:27:26 +0000 (22:27 +0000)]
staging: wilc1000: use cfg80211 ssid list instead of repacking it

Avoid repacking ssid values into struct wilc_probe_ssid, and use the
cfg80211 provided struct to pass the ssid list to wilc_scan.
With this change, struct wilc_probe_ssid, struct wilc_probe_ssid_info
and function wilc_wfi_cfg_alloc_fill_ssid will not be needed anymore.

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vc04_services: add missing __user annotations
Jasminko Dedic [Sun, 24 Mar 2019 17:17:05 +0000 (01:17 +0800)]
staging: vc04_services: add missing __user annotations

This patch fixes the following sparse warnings by adding missing __user
annotations. It also cleans up two related unnecessary casts by reuseing
casts already made a few lines up. Remaining sparse warnings are of a
different type.

vchiq_arm.c:1606:14: warning: incorrect type in assignment (different address spaces)
vchiq_arm.c:1606:14:    expected struct vchiq_queue_message *args
vchiq_arm.c:1606:14:    got void [noderef] <asn:1> *

vchiq_arm.c:1612:13: warning: incorrect type in argument 1 (different address spaces)
vchiq_arm.c:1612:13:    expected void const volatile [noderef] <asn:1> *
vchiq_arm.c:1612:13:    got unsigned int *

vchiq_arm.c:1613:13: warning: incorrect type in argument 1 (different address spaces)
vchiq_arm.c:1613:13:    expected void const volatile [noderef] <asn:1> *
vchiq_arm.c:1613:13:    got unsigned int *

vchiq_arm.c:1614:13: warning: incorrect type in argument 1 (different address spaces)
vchiq_arm.c:1614:13:    expected void const volatile [noderef] <asn:1> *
vchiq_arm.c:1614:13:    got struct vchiq_element const [noderef] <asn:1> **

vchiq_arm.c:1638:21: warning: incorrect type in argument 1 (different address spaces)
vchiq_arm.c:1638:21:    expected void const volatile [noderef] <asn:1> *
vchiq_arm.c:1638:21:    got struct vchiq_element const [noderef] <asn:1> **

Signed-off-by: Jasminko Dedic <betelge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Remove comparison to true
Branden Bonaby [Tue, 26 Mar 2019 17:29:30 +0000 (13:29 -0400)]
staging: rtl8712: Remove comparison to true

Remove the comparison to true in the if statement.
CHECK: Using comparison to true is error prone.

Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: remove unnecessary parentheses
Branden Bonaby [Tue, 26 Mar 2019 17:29:28 +0000 (13:29 -0400)]
staging: rtl8712: remove unnecessary parentheses

Remove unnecessary parentheses in rtl8712_xmit.c.
Reported by checkpatch.

Signed-off-by: Branden Bonaby <brandonbonaby94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192u: Remove typedef for struct.
Sanjana Sanikommu [Tue, 26 Mar 2019 17:09:42 +0000 (22:39 +0530)]
staging: rtl8192u: Remove typedef for struct.

Challenge suggested by coccinelle.

Linux kernel coding style guidelines suggest not using typedefs for
structure.
The following Coccinelle semantic patch detects the cases for struct
type:

@tn@
identifier i;
type td;
@@

-typedef
 struct i { ... }
-td
 ;

@@
type tn.td;
identifier tn.i;
@@

-td
+ struct i

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: rtl8188eu: Get rid of custom macro, DBG_88E in kmalloc
Madhumitha Prabakaran [Tue, 26 Mar 2019 14:57:42 +0000 (09:57 -0500)]
Staging: rtl8188eu: Get rid of custom macro, DBG_88E in kmalloc

Get rid of custom macro, DBG_88E for printing message in kmalloc
in order to maintain Linux kernel coding style based on which kernel
does not print failure warning.

Issue suggested by Coccinelle.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: sm750fb: lower case to fix camelcase checkpatch warning
Jules Irenge [Mon, 25 Mar 2019 22:23:13 +0000 (22:23 +0000)]
staging: sm750fb: lower case to fix camelcase checkpatch warning

Lower case to fix CamelCase checkpatch.pl warning
"CHECK: Avoid CamelCase: <ulActualMxClk>".

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: support IO read error injection
Gao Xiang [Mon, 25 Mar 2019 03:40:09 +0000 (11:40 +0800)]
staging: erofs: support IO read error injection

Used to simulate disk IO read error for testing fatal
error tolerance.

Here are the details,
1) use bio->bi_private to indicate super_block
   for non-compressed bios since some (mainly meta)
   pages can be of the corresponding bdev inode;
2) get super_block dynamically for compressed bios,
   therefore it could not inject bios full of staging
   pages, yet it doesn't affect the normal usage.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: introduce erofs_page_is_managed()
Gao Xiang [Mon, 25 Mar 2019 03:40:08 +0000 (11:40 +0800)]
staging: erofs: introduce erofs_page_is_managed()

1) In order to clean up unnecessary
   page->mapping == MNGD_MAPPING(sbi) wrapped by #ifdefs;

2) Needed by "staging: erofs: support IO read error injection".

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: fix error handling when failed to read compresssed data
Gao Xiang [Mon, 25 Mar 2019 03:40:07 +0000 (11:40 +0800)]
staging: erofs: fix error handling when failed to read compresssed data

Complete read error handling paths for all three kinds of
compressed pages:

 1) For cache-managed pages, PG_uptodate will be checked since
    read_endio will unlock and SetPageUptodate for these pages;

 2) For inplaced pages, read_endio cannot SetPageUptodate directly
    since it should be used to mark the final decompressed data,
    PG_error will be set with page locked for IO error instead;

 3) For staging pages, PG_error is used, which is similar to
    what we do for inplaced pages.

Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support")
Cc: <stable@vger.kernel.org> # 4.19+
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: sm750fb: Prefer using the BIT macro
Sanjana Sanikommu [Mon, 25 Mar 2019 07:44:01 +0000 (13:14 +0530)]
staging: sm750fb: Prefer using the BIT macro

Challenge suggested by coccinelle.

Replace bit shifting on 1 with the BIT(x) macro.
Coccinelle script:

@@
constant c;
@@

-(1 << c)
+BIT(c)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: Fix indentation and spacing issues
Sammy Abed [Mon, 25 Mar 2019 03:15:03 +0000 (20:15 -0700)]
staging: rtl8723bs: include: Fix indentation and spacing issues

Replaced spaces with tabs at the beginning of lines.
Added spaces around a (+) operator.

Signed-off-by: Sammy Abed <abdlwahdsa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: ralink-gdma: ralink-gdma.c fixed line width
Dominik Adamski [Sun, 24 Mar 2019 19:20:20 +0000 (20:20 +0100)]
staging: ralink-gdma: ralink-gdma.c fixed line width

Fix checkpatch issue:
line over 80 characters

Signed-off-by: Dominik Adamski <adamski.dominik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: cleanup long line in odm.c
Michael Straube [Sun, 24 Mar 2019 17:21:51 +0000 (18:21 +0100)]
staging: rtl8188eu: cleanup long line in odm.c

Align a comment to clear a line over 80 characters
checkpatch warning.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: pi433: remove unnecessary calling rf69_set_mode()
Sidong Yang [Sun, 24 Mar 2019 14:54:41 +0000 (14:54 +0000)]
staging: pi433: remove unnecessary calling rf69_set_mode()

Remove unnecessary rf69_set_mode() function call when rx is waiting for
a telegram. There is waste to call rf69_set_mode() twice for becoming
standby mode.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: ralink-gdma: Remove space after cast
Bharath Vedartham [Sun, 24 Mar 2019 10:02:35 +0000 (15:32 +0530)]
staging: ralink-gdma: Remove space after cast

This fixes the checkpatch.pl check: "No space is necessary after the
cast".

Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: ralink-gdma: Change unsigned to unsigned int
Bharath Vedartham [Sun, 24 Mar 2019 09:48:03 +0000 (15:18 +0530)]
staging: ralink-gdma: Change unsigned to unsigned int

This fixes the checkpatch.pl warning: "Prefer unsigned to unsigned int"

Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: tegra-vde: remove unnecessary boilerplate license identifier text
Jules Irenge [Mon, 25 Mar 2019 17:42:06 +0000 (17:42 +0000)]
staging: tegra-vde: remove unnecessary boilerplate license identifier text

Remove unnecessary boilerplate license identifier text.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: tegra-vde: Add SPDX GPL-2.0+ license identifier to fix checkpatch warning
Jules Irenge [Mon, 25 Mar 2019 17:42:05 +0000 (17:42 +0000)]
staging: tegra-vde: Add SPDX GPL-2.0+ license identifier to fix checkpatch warning

Add the SPDX GPL-2.0+ license identifier to fix checkpatch.pl warning
"WARNING: Missing or malformed SPDX-License-Identifier tag in line 1"

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: media: davinci_vpfe: Drop macros
Madhumitha Prabakaran [Mon, 25 Mar 2019 16:42:55 +0000 (11:42 -0500)]
Staging: media: davinci_vpfe: Drop macros

Drop macros instead use functions set_bit() and clear_bit directly.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: media: davinci_vpfe: Fix preferred form of passing a size
Madhumitha Prabakaran [Mon, 25 Mar 2019 16:53:37 +0000 (11:53 -0500)]
Staging: media: davinci_vpfe: Fix preferred form of passing a size

Fix preferred form of passing a size of a struct to improve readability
and eradicate an opportunity for a bug when the pointer variable type is
changed but the corresponding sizeof that is passed to a memory
allocator is not.

Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: media: zoran: Use unsigned int instead of unsigned
Vatsala Narang [Sat, 23 Mar 2019 23:20:07 +0000 (04:50 +0530)]
staging: media: zoran: Use unsigned int instead of unsigned

Replace 'unsigned' with 'unsigned int' to get rid of checkpatch warning

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: media: imx: mipi-csi2: Remove unnecessary error messages
Bhanusree Pola [Sat, 23 Mar 2019 07:51:29 +0000 (13:21 +0530)]
Staging: media: imx: mipi-csi2: Remove unnecessary error messages

The function devm_ioremap already prints error message  when there
is no enough memory.
Remove print statements that give error messages
Issue found using coccinelle
The following semantic patch is used to solve this:

<smpl>
@@
expression x;
constant char[] C;
identifier f;
@@

x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));

if(x==NULL)
{
...
(
-f(C,...);
|
-f(...,C);
)
...
}
</smpl>

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: lines should not end with a parentheses
Vatsala Narang [Mon, 25 Mar 2019 11:27:24 +0000 (16:57 +0530)]
staging: vt6655: lines should not end with a parentheses

Adjust code to fix the style issue-lines should not end with a
parentheses

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: Modify comment style of SPDX License Identifier
Ganesh Biradar [Sun, 24 Mar 2019 13:06:09 +0000 (18:36 +0530)]
staging: vt6655: Modify comment style of SPDX License Identifier

Fix the comment style of SPDX license identifier based on header file
type

Signed-off-by: Ganesh Biradar <grbesd1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rts5208: correction in spelling
Payal Kshirsagar [Sun, 24 Mar 2019 03:43:42 +0000 (09:13 +0530)]
staging: rts5208: correction in spelling

Correct misspelled word.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: Fix identation issue
Vatsala Narang [Sat, 23 Mar 2019 22:09:15 +0000 (03:39 +0530)]
staging: rtl8723bs: include: Fix identation issue

Corrected the identation of switch case to get rid of checkpatch error

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: Fix a space issue
Vatsala Narang [Sat, 23 Mar 2019 22:05:14 +0000 (03:35 +0530)]
staging: rtl8723bs: include: Fix a space issue

Replace 'foo * bar' with 'foo *bar' to fix a checkpatch warning

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: Fix spelling mistake
Vatsala Narang [Sat, 23 Mar 2019 10:39:24 +0000 (16:09 +0530)]
staging: rtl8723bs: include: Fix spelling mistake

Replace negoitation with negotiation to get rid of checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove function rtw_alloc_network()
Nishka Dasgupta [Fri, 22 Mar 2019 14:38:26 +0000 (20:08 +0530)]
staging: rtl8723bs: Remove function rtw_alloc_network()

Remove function rtw_alloc_network() as all it does is call
_rtw_alloc_network().
Rename _rtw_alloc_network() to rtw_alloc_network().
Change references to _rtw_alloc_network() to refer to
rtw_alloc_network().
Issue first noticed while using Coccinelle and ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove parentheses
Nishka Dasgupta [Fri, 22 Mar 2019 14:38:25 +0000 (20:08 +0530)]
staging: rtl8723bs: core: Remove parentheses

Remove unnecessary parentheses around variables. Issue found with
Checkpatch.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Change datatype from sint to int
Nishka Dasgupta [Fri, 22 Mar 2019 14:38:24 +0000 (20:08 +0530)]
staging: rtl8723bs: core: Change datatype from sint to int

Change datatype of local variable from sint to int.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging; rtl8723bs: Remove unnecessary function rtw_init_mlme_priv()
Nishka Dasgupta [Fri, 22 Mar 2019 14:38:23 +0000 (20:08 +0530)]
staging; rtl8723bs: Remove unnecessary function rtw_init_mlme_priv()

Remove function rtw_init_mlme_priv() as all it does is call
_rtw_init_mlme_priv().
Change the name of _rtw_init_mlme_priv() to rtw_init_mlme_priv() and its
return type to int.
Remove references to _rtw_init_mlme_priv() from the corresponding header
file.
Suggestion to delete return variable from rtw_init_mlme_priv() put forward
by Coccinelle using ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Check for nonzero number of scatterlist entries
George Hilliard [Wed, 20 Mar 2019 22:42:05 +0000 (16:42 -0600)]
staging: mt7621-mmc: Check for nonzero number of scatterlist entries

The buffer descriptor setup loop is correct only if it is setting up at
least one bd struct.  Besides, there is an error if dma_map_sg() returns
0, which is possible and must be handled.

Additionally, remove the BUG_ON() checking sglen, which is unnecessary
because we configure DMA with that constraint during init.

Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Fix warning when reloading module with debug msgs enabled
George Hilliard [Wed, 20 Mar 2019 22:42:03 +0000 (16:42 -0600)]
staging: mt7621-mmc: Fix warning when reloading module with debug msgs enabled

The kernel complained:

    [  510.277151] WARNING: CPU: 0 PID: 395 at fs/proc/generic.c:360 proc_register+0xf0/0x108
    [  510.292891] proc_dir_entry '/proc/msdc_debug' already registered

when doing a modprobe/rmmod/modprobe of this module if debug messages
are compiled in.  Fix this by removing the proc entry when the module is
unloaded.

Signed-off-by: George Hilliard <thirtythreeforty@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: Use !x or x in place of NULL comparision
Bhanusree Pola [Fri, 22 Mar 2019 02:38:16 +0000 (10:38 +0800)]
staging: erofs: Use !x or x in place of NULL comparision

Test for NULL as !x instead of NULL comparisions.
Issue found using coccinelle
Semantic patch used to solve the problem is as follows

// <smpl>
@@
expression x;
statement S;
@@

x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));

-if(x==NULL)
+if(!x)
S

@@
expression e;
@@

-e == NULL
+!e
// </smpl>

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
[ Gao Xiang: fix x != NULL comparision to x as well. ]
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: remove unnecessary parentheses
Michael Straube [Fri, 22 Mar 2019 13:17:06 +0000 (14:17 +0100)]
staging: rtl8188eu: remove unnecessary parentheses

Remove unnecessary parentheses in rtl8188eu_xmit.c.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove return variables in rtw_mlme_ext.c
Nishka Dasgupta [Thu, 21 Mar 2019 20:13:56 +0000 (01:43 +0530)]
staging: rtl8723bs: core: Remove return variables in rtw_mlme_ext.c

Remove unnecessary local return variables in rtw_mlme_ext.c. Issue found
with Coccinelle using ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Change NULL comparisons to Boolean negation
Nishka Dasgupta [Thu, 21 Mar 2019 20:13:54 +0000 (01:43 +0530)]
staging: rtl8723bs: core: Change NULL comparisons to Boolean negation

Change NULL comparisons to Boolean negations. Issue found with
Coccinelle using matchnull.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: Remove return variables from wilc_spi.c
Nishka Dasgupta [Thu, 21 Mar 2019 19:55:56 +0000 (01:25 +0530)]
staging: wilc1000: Remove return variables from wilc_spi.c

Remove return variables from wilc_spi.c. Issue found with Coccinelle
using ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: Remove return variable from host_interface.c
Nishka Dasgupta [Thu, 21 Mar 2019 19:55:55 +0000 (01:25 +0530)]
staging: wilc1000: Remove return variable from host_interface.c

Remove return variable from host_interface.c. Issue found with
Coccinelle using ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: Add spaces around operator
Vatsala Narang [Thu, 21 Mar 2019 21:40:05 +0000 (03:10 +0530)]
staging: vt6655: Add spaces around operator

Add spaces around '-' operator to get rid of checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: pi433: remove empty space to fix line over 80 characters warning
Jules Irenge [Thu, 21 Mar 2019 19:54:08 +0000 (19:54 +0000)]
staging: pi433: remove empty space to fix line over 80 characters warning

Remove empty space to solve checkpatch.pl warning:
"WARNING: line over 80 characters".

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: gdm724x: Remove unnecessary print statements
Bhanusree Pola [Fri, 22 Mar 2019 12:40:10 +0000 (18:10 +0530)]
Staging: gdm724x: Remove unnecessary print statements

Remove print statements that provide information about error messages
when memory allocation is failed.
Issue found using coccinelle
The following semantic patch is used to solve this:

<smpl>
@@
expression x;
constant char[] C;
identifier f;
@@

x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));

if(x==NULL)
{
...
(
-f(C,...);
|
-f(...,C);
)
...
}
</smpl>

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: comedi: ni_mio_common.c: Added blank line after declarations
Arash Fotouhi [Thu, 21 Mar 2019 19:18:12 +0000 (12:18 -0700)]
Staging: comedi: ni_mio_common.c: Added blank line after declarations

Added blank line after declarations.

Signed-off-by: Arash Fotouhi <arash@arashfotouhi.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: remove typedef for struct pno_scan_info
Himadri Pandya [Thu, 21 Mar 2019 18:14:05 +0000 (23:44 +0530)]
staging: rtl8723bs: include: remove typedef for struct pno_scan_info

Remove typedef for struct pno_scan_info as The Linux kernel coding style
guidelines discourage the use of typedefs for struct types.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: remove typedef for struct pno_scan_channel_info
Himadri Pandya [Thu, 21 Mar 2019 18:14:04 +0000 (23:44 +0530)]
staging: rtl8723bs: include: remove typedef for struct pno_scan_channel_info

Remove typedef for struct pno_scan_channel_info as The Linux kernel
coding style guidelines discourage the use of typedefs for struct
types.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: remove typedef for struct pno_ssid_list
Himadri Pandya [Thu, 21 Mar 2019 18:14:03 +0000 (23:44 +0530)]
staging: rtl8723bs: include: remove typedef for struct pno_ssid_list

Remove typedef from struct pno_ssid_list as The Linux kernel coding
style guidelines discourage the use of typedefs for struct types.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: remove typedef for struct pno_ssid
Himadri Pandya [Thu, 21 Mar 2019 18:14:02 +0000 (23:44 +0530)]
staging: rtl8723bs: include: remove typedef for struct pno_ssid

Remove typedef for struct pno_ssid as The Linux kernel coding style
guidelines discourage the use of typedefs for struct types.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: include: remove typedef for struct pno_nlo_info
Himadri Pandya [Thu, 21 Mar 2019 18:14:01 +0000 (23:44 +0530)]
staging: rtl8723bs: include: remove typedef for struct pno_nlo_info

Remove typedef for struct pno_nlo_info as the Linux kernel coding style
guidelines discourage the use of typedefs for struct types.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Change NULL comparison to Boolean negation
Nishka Dasgupta [Thu, 21 Mar 2019 18:48:46 +0000 (00:18 +0530)]
staging: rtl8723bs: core: Change NULL comparison to Boolean negation

Change NULL comparison to Boolean negation. Issue found with Coccinelle
using matchnull.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: rtl8712_led.c: remove blank line
Payal Kshirsagar [Thu, 21 Mar 2019 15:59:06 +0000 (21:29 +0530)]
staging: rtl8712: rtl8712_led.c: remove blank line

To avoid style issues, remove multiple blank lines.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: rtl8712_led.c: alignment should match open parenthesis
Payal Kshirsagar [Thu, 21 Mar 2019 15:50:54 +0000 (21:20 +0530)]
staging: rtl8712: rtl8712_led.c: alignment should match open parenthesis

Align code to the open parenthesis to fix the alignment issue.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: rtl8712_led.c: remove unnecessary parentheses
Payal Kshirsagar [Thu, 21 Mar 2019 15:44:10 +0000 (21:14 +0530)]
staging: rtl8712: rtl8712_led.c: remove unnecessary parentheses

Fix unnecessary parentheses issue.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: rtl8712_efuse.h: alignment should match open parenthesis
Payal Kshirsagar [Thu, 21 Mar 2019 14:51:45 +0000 (20:21 +0530)]
staging: rtl8712: rtl8712_efuse.h: alignment should match open parenthesis

Align code to the open parenthesis to fix the alignment issue.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: rtl8712_efuse.h: remove blank line
Payal Kshirsagar [Thu, 21 Mar 2019 14:46:38 +0000 (20:16 +0530)]
staging: rtl8712: rtl8712_efuse.h: remove blank line

To avoid style issues, remove multiple blank lines.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: alignment should match open parenthesis
Payal Kshirsagar [Thu, 21 Mar 2019 14:39:08 +0000 (20:09 +0530)]
staging: rtl8712: alignment should match open parenthesis

Align code to the open parenthesis to fix the alignment issue.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: remove blank line
Payal Kshirsagar [Thu, 21 Mar 2019 14:26:43 +0000 (19:56 +0530)]
staging: rtl8712: remove blank line

To avoid style issues, remove multiple blank lines.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: media: Use !x in place of NULL comparision
Bhanusree Pola [Thu, 21 Mar 2019 09:35:27 +0000 (15:05 +0530)]
Staging: media: Use !x in place of NULL comparision

Test for NULL as !x instead of NULL comparisions for
functions that return NULL on failure.
Issue found using coccinelle
Semantic patch used to solve the problem is as follows

// <smpl>
@@
expression x;
statement S;
@@

x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));

-if(x==NULL)
+if(!x)
// </smpl>

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: netlogic: Remove unnecessary error print
Himadri Pandya [Thu, 21 Mar 2019 09:57:17 +0000 (15:27 +0530)]
staging: netlogic: Remove unnecessary error print

Kmalloc normally produces a backtrace when there is not enough memory.
So it is unnecessary to print an error message that provides only this
information. Hence, remove pr_error() from memory allocation check.
Issue found using Coccinelle.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: lines should not end with a parenthesis
Payal Kshirsagar [Thu, 21 Mar 2019 10:35:36 +0000 (16:05 +0530)]
staging: vt6655: lines should not end with a parenthesis

Adjust code to fix the style issue – lines should not end with a
parenthesis.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6655: correction in spelling
Payal Kshirsagar [Thu, 21 Mar 2019 09:52:56 +0000 (15:22 +0530)]
staging: vt6655: correction in spelling

Correct misspelled word.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192e: kconfig: use help over --help--
Anushka Shukla [Thu, 21 Mar 2019 18:26:17 +0000 (23:56 +0530)]
staging: rtl8192e: kconfig: use help over --help--

use help over --help-- for new help text

Signed-off-by: Anushka Shukla <anushkacharu9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: core: Add spaces around operators
Vatsala Narang [Thu, 21 Mar 2019 15:14:47 +0000 (20:44 +0530)]
staging: rtl8188eu: core: Add spaces around operators

Add spaces around '+' operator to get rid of checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: core: Remove unnecessary parentheses
Vatsala Narang [Thu, 21 Mar 2019 15:12:45 +0000 (20:42 +0530)]
staging: rtl8188eu: core: Remove unnecessary parentheses

Remove unnecessary parentheses after 'address-of' operator
Issue found with checkpatch.pl

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: core: rtw_mlme: Remove return variables.
Sanjana Sanikommu [Thu, 21 Mar 2019 07:54:04 +0000 (13:24 +0530)]
staging: rtl8188eu: core: rtw_mlme: Remove return variables.

The last two lines in the function could
be compressed into one. Avoid usage of local variable.
Issue found with Coccinelle using ret.cocci.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: emxx_udc: lines should not end with parenthesis
Payal Kshirsagar [Thu, 21 Mar 2019 11:40:04 +0000 (17:10 +0530)]
staging: emxx_udc: lines should not end with parenthesis

Adjust code to meet the style of “lines should not end with
parenthesis”.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: greybus: sdio.c: Remove unncessary paranthesis.
Sanjana Sanikommu [Thu, 21 Mar 2019 16:31:08 +0000 (22:01 +0530)]
staging: greybus: sdio.c: Remove unncessary paranthesis.

Challenge suggested by coccinelle.
Remove unnecessary parathesis around the right hand of
assignment using the below script.

@@
binary operator op = {==,!=,&&,||,>=,<=,&,|};
expression l, r, t;
@@

(
l = (r op t)
|
l =
-(
r
-)
)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>