Commit Graph

824914 Commits

Author SHA1 Message Date
Gao Xiang d61fbb6b16 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>
2019-03-26 05:51:17 +09:00
Gao Xiang 1115249602 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: 3883a79abd ("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>
2019-03-26 05:51:17 +09:00
Sanjana Sanikommu c8723cb8d0 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>
2019-03-26 05:49:12 +09:00
Sammy Abed dc1e3766ec 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>
2019-03-26 05:49:12 +09:00
Dominik Adamski 9671166400 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>
2019-03-26 05:49:12 +09:00
Michael Straube d638e7eeda 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>
2019-03-26 05:49:12 +09:00
Sidong Yang e5adddf5ae 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>
2019-03-26 05:49:11 +09:00
Bharath Vedartham 344201e0f8 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>
2019-03-26 05:47:37 +09:00
Bharath Vedartham 4da99b90ce 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>
2019-03-26 05:47:37 +09:00
Jules Irenge 506bce7335 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>
2019-03-26 05:47:36 +09:00
Jules Irenge 3d10783313 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>
2019-03-26 05:47:36 +09:00
Madhumitha Prabakaran 993e826884 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>
2019-03-26 05:44:54 +09:00
Madhumitha Prabakaran a3703713e1 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>
2019-03-26 05:44:53 +09:00
Vatsala Narang ac394266dc 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>
2019-03-26 05:44:53 +09:00
Bhanusree Pola 1ec119f094 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>
2019-03-26 05:44:53 +09:00
Vatsala Narang ab2a7a292a 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>
2019-03-26 05:42:37 +09:00
Ganesh Biradar 03f4a7b688 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>
2019-03-26 05:41:28 +09:00
Payal Kshirsagar 6a023205d2 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>
2019-03-24 10:06:36 +01:00
Vatsala Narang 9c0867e0b8 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>
2019-03-24 10:06:04 +01:00
Vatsala Narang d01deea6d7 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>
2019-03-24 10:06:04 +01:00
Vatsala Narang 3fe9ff4877 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>
2019-03-24 10:01:28 +01:00
Nishka Dasgupta 8e97f7d866 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>
2019-03-24 09:50:02 +01:00
Nishka Dasgupta 367cdd1305 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>
2019-03-24 09:50:02 +01:00
Nishka Dasgupta 2c506ddfd5 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>
2019-03-24 09:50:02 +01:00
Nishka Dasgupta cb8de77c78 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>
2019-03-24 09:50:02 +01:00
George Hilliard d4223e06b6 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>
2019-03-22 15:20:27 +01:00
George Hilliard f2778bb3cb 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>
2019-03-22 15:20:27 +01:00
Bhanusree Pola 561fb35a9d 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>
2019-03-22 15:20:25 +01:00
Michael Straube 51385436f1 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>
2019-03-22 15:20:25 +01:00
Nishka Dasgupta 63ff599a76 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>
2019-03-22 15:16:29 +01:00
Nishka Dasgupta 5947e900d0 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>
2019-03-22 15:16:29 +01:00
Nishka Dasgupta 283a9e4b56 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>
2019-03-22 15:16:29 +01:00
Nishka Dasgupta 9531375229 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>
2019-03-22 15:16:28 +01:00
Vatsala Narang b6d00e179f 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>
2019-03-22 15:16:28 +01:00
Jules Irenge 8f51bd83e4 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>
2019-03-22 15:16:28 +01:00
Bhanusree Pola a41d42a9fd 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>
2019-03-22 15:16:28 +01:00
Arash Fotouhi 83cdfc17a9 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>
2019-03-22 15:16:27 +01:00
Himadri Pandya 454e531f93 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>
2019-03-21 20:11:36 +01:00
Himadri Pandya bc8212ef3d 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>
2019-03-21 20:11:36 +01:00
Himadri Pandya cc74619715 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>
2019-03-21 20:11:36 +01:00
Himadri Pandya 8b4e7034fd 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>
2019-03-21 20:11:36 +01:00
Himadri Pandya 319aa7e516 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>
2019-03-21 20:10:26 +01:00
Nishka Dasgupta 8cf0466a2d 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>
2019-03-21 20:10:26 +01:00
Payal Kshirsagar a752d01c3d 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>
2019-03-21 20:08:08 +01:00
Payal Kshirsagar 32c6abf0d0 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>
2019-03-21 20:08:08 +01:00
Payal Kshirsagar a936ac3add 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>
2019-03-21 20:08:08 +01:00
Payal Kshirsagar 447da755b8 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>
2019-03-21 20:08:08 +01:00
Payal Kshirsagar 4fb5eb2da9 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>
2019-03-21 20:08:08 +01:00
Payal Kshirsagar f916e23f56 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>
2019-03-21 20:08:08 +01:00
Payal Kshirsagar 88ad17b6fd 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>
2019-03-21 20:08:07 +01:00