linux-2.6-block.git
5 years agostaging: rtl8723bs: hal: Fix Brace Style Issues in if/else statements
Shobhit Kukreti [Wed, 19 Jun 2019 01:42:26 +0000 (18:42 -0700)]
staging: rtl8723bs: hal: Fix Brace Style Issues in if/else statements

Cleaned Up code to fix brace style issues reported by checkpatch:

-space required before the open brace '{'
-Unbalanced braces around if/else statements

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Remove True/False Comparisons
Shobhit Kukreti [Wed, 19 Jun 2019 01:14:44 +0000 (18:14 -0700)]
staging: rtl8723bs: hal: Remove True/False Comparisons

Removing comparisons to True/False in if statements.

Checkpatch reported:
CHECK: Using comparison to true is error prone

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_cmd: fix comparison to true is error prone
Hariprasad Kelam [Tue, 18 Jun 2019 18:59:27 +0000 (00:29 +0530)]
staging: rtl8723bs: hal: rtl8723b_cmd: fix comparison to true is error prone

this patch fixes below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_cmd: fix Comparison to NULL
Hariprasad Kelam [Tue, 18 Jun 2019 18:59:08 +0000 (00:29 +0530)]
staging: rtl8723bs: hal: rtl8723b_cmd: fix Comparison to NULL

This patch fixes below issues reported by checkpatch

CHECK: Comparison to NULL could be written "psta"
CHECK: Comparison to NULL could be written
"pmlmepriv->wps_probe_resp_ie"
CHECK: Comparison to NULL could be written "psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: fix integer overflow with left shifts
Colin Ian King [Tue, 18 Jun 2019 10:15:54 +0000 (11:15 +0100)]
staging: kpc2000: fix integer overflow with left shifts

Currently there are several left shifts that are assigned to 64 bit
unsigned longs where a signed int 1 is being shifted, resulting in
an integer overflow.  Fix this bit using the BIT_ULL macro to perform
a 64 bit shift.  Also clean up an overly long statement.

Addresses-Coverity: ("Unintentional integer overflow")
Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: simplify error handling in kp2000_pcie_probe
Simon Sandström [Wed, 19 Jun 2019 06:36:07 +0000 (08:36 +0200)]
staging: kpc2000: simplify error handling in kp2000_pcie_probe

We can get rid of a few iounmaps in the middle of the function by
re-ordering the error handling labels and adding two new labels.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: rtl87x_io : make use of kzalloc
Hariprasad Kelam [Tue, 18 Jun 2019 17:33:05 +0000 (23:03 +0530)]
staging: rtl8712: rtl87x_io : make use of kzalloc

kmalloc followed by memset can be replaced with kzalloc.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192u: ieee80211: Remove redundant memset
Hariprasad Kelam [Tue, 18 Jun 2019 17:55:16 +0000 (23:25 +0530)]
staging: rtl8192u: ieee80211: Remove redundant memset

alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192e: rtllib_module: Remove redundant memset
Hariprasad Kelam [Tue, 18 Jun 2019 18:04:31 +0000 (23:34 +0530)]
staging: rtl8192e: rtllib_module: Remove redundant memset

alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wilc1000: Remove redundant memset
Hariprasad Kelam [Tue, 18 Jun 2019 18:25:07 +0000 (23:55 +0530)]
staging: wilc1000: Remove redundant memset

alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove myself from CC:
Bastien Nocera [Thu, 20 Jun 2019 09:51:21 +0000 (11:51 +0200)]
staging: rtl8723bs: Remove myself from CC:

I don't have easy access to this hardware anymore.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vt6656: fix indentation on break statement
Colin Ian King [Wed, 19 Jun 2019 16:54:05 +0000 (17:54 +0100)]
staging: vt6656: fix indentation on break statement

The break statement is indented one level too deep, fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: odm_HWConfig: Unneeded variable: "result". Return "HAL_STATU...
Hariprasad Kelam [Tue, 18 Jun 2019 02:39:14 +0000 (08:09 +0530)]
staging: rtl8723bs: hal: odm_HWConfig: Unneeded variable: "result". Return "HAL_STATUS_SUCCESS"

Remove function ODM_ConfigMACWithHeaderFile as trace is not necessary
and as it is getting called only once and call direct function
"ODM_ReadAndConfig_MP_8723B_MAC_REG"

Issue identified by coccicheck

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
----
changes v2: fixed typo in commit message
changes v3: Remove function ODM_ConfigMACWithHeaderFile and replace
            with ODM_ReadAndConfig_MP_8723B_MAC_REG

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_rf6052: fix spaces preferred around unary operator
Hariprasad Kelam [Tue, 18 Jun 2019 01:20:07 +0000 (06:50 +0530)]
staging: rtl8723bs: hal: rtl8723b_rf6052: fix spaces preferred around unary operator

ERROR: spaces required around that '<<' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_hal_init: Remove set but unused variable
Hariprasad Kelam [Tue, 18 Jun 2019 01:09:03 +0000 (06:39 +0530)]
staging: rtl8723bs: hal: rtl8723b_hal_init: Remove set but unused variable

Remove variable pHalData as it is not being used in function.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_hal_init: fix Using comparison to true is error...
Hariprasad Kelam [Tue, 18 Jun 2019 01:08:28 +0000 (06:38 +0530)]
staging: rtl8723bs: hal: rtl8723b_hal_init: fix Using comparison to true is error prone

This patch tries to fix below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to true is false prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_hal_init: fix Comparison to NULL
Hariprasad Kelam [Tue, 18 Jun 2019 01:07:03 +0000 (06:37 +0530)]
staging: rtl8723bs: hal: rtl8723b_hal_init: fix Comparison to NULL

This patch tries to fix below issues reported by checkpatch

CHECK: Comparison to NULL could be written "!efuseTbl"
CHECK: Comparison to NULL could be written "!psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging/rtl8723bs/core/rtw_ap: Remove redundant call to memset
Hariprasad Kelam [Sun, 16 Jun 2019 03:35:27 +0000 (09:05 +0530)]
staging/rtl8723bs/core/rtw_ap: Remove redundant call to memset

rtw_zmalloc is internally doing memset . So there is no need to call memset
again.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging/rtl8723bs/core: Remove redundant call to memset
Hariprasad Kelam [Sun, 16 Jun 2019 03:27:05 +0000 (08:57 +0530)]
staging/rtl8723bs/core: Remove redundant call to memset

rtw_zmalloc is doing memset . So there is no need to call memset again.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Add null check after memory allocation
Hariprasad Kelam [Sun, 16 Jun 2019 03:14:09 +0000 (08:44 +0530)]
staging: rtl8723bs: hal: Add null check after memory allocation

Add NULL check post call to rtw_zmalloc.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: fix Using comparison to false is error prone
Hariprasad Kelam [Sun, 16 Jun 2019 02:54:31 +0000 (08:24 +0530)]
staging: rtl8723bs: hal: fix Using comparison to false is error prone

fix below issue reported by checkpatch

CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Remove return type of initrecvbuf
Hariprasad Kelam [Sun, 16 Jun 2019 02:53:55 +0000 (08:23 +0530)]
staging: rtl8723bs: hal: Remove return type of initrecvbuf

change return of initrecvbuf from s32 to void. As this function always
returns SUCCESS .

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: spaces preferred around unary operator
Hariprasad Kelam [Sat, 15 Jun 2019 04:36:57 +0000 (10:06 +0530)]
staging: rtl8723bs: hal: spaces preferred around unary operator

This patch fixes below issues reported by checkpatch

CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: spaces preferred around that '/' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Using comparison to true is error prone
Hariprasad Kelam [Sat, 15 Jun 2019 04:36:36 +0000 (10:06 +0530)]
staging: rtl8723bs: hal: Using comparison to true is error prone

fix below issue reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: Add missing newline at end of file
Geert Uytterhoeven [Mon, 17 Jun 2019 14:39:39 +0000 (16:39 +0200)]
staging: Add missing newline at end of file

"git diff" says:

    \ No newline at end of file

after modifying the files.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: clean up initialization of pointer de
Colin Ian King [Mon, 17 Jun 2019 12:55:29 +0000 (13:55 +0100)]
staging: erofs: clean up initialization of pointer de

Currently pointer de is being initialized with a value that is
never read and a few statements later de is being re-assigned. Clean
this up by ininitialzing de and removing the re-assignment.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: comedi: usbdux: remove redundant initialization of fx2delay
Colin Ian King [Mon, 17 Jun 2019 13:03:58 +0000 (14:03 +0100)]
staging: comedi: usbdux: remove redundant initialization of fx2delay

Variable fx2delay is being initialized to a value that is never read
and is being re-assigned a few statements later. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: rename data_mapping_mode to datamode
Gao Xiang [Tue, 11 Jun 2019 02:42:20 +0000 (10:42 +0800)]
staging: erofs: rename data_mapping_mode to datamode

data_mapping_mode is too long as a member name of erofs_vnode,
datamode is straight-forward enough.

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 agoMerge branch 'erofs_fix' into staging-next
Greg Kroah-Hartman [Mon, 17 Jun 2019 21:00:37 +0000 (23:00 +0200)]
Merge branch 'erofs_fix' into staging-next

erofs needed a fix in both -linus and -next branches at the same time.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: add requirements field in superblock
Gao Xiang [Thu, 13 Jun 2019 08:35:41 +0000 (16:35 +0800)]
staging: erofs: add requirements field in superblock

There are some backward incompatible features pending
for months, mainly due to on-disk format expensions.

However, we should ensure that it cannot be mounted with
old kernels. Otherwise, it will causes unexpected behaviors.

Fixes: ba2b77a82022 ("staging: erofs: add super block operations")
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: rtl8723bs: hal: sdio_halinit: fix Comparison to NULL
Hariprasad Kelam [Fri, 14 Jun 2019 02:55:19 +0000 (08:25 +0530)]
staging: rtl8723bs: hal: sdio_halinit: fix Comparison to NULL

This patch fixes below issue reported by checkpatch

CHECK: Comparison to NULL could be written "psta"
CHECK: Comparison to NULL could be written "psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
-----
changes in v2: Send proper patch with out corruption
----
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_halinit: fix spaces preferred around that unary operator
Hariprasad Kelam [Fri, 14 Jun 2019 02:54:59 +0000 (08:24 +0530)]
staging: rtl8723bs: hal: sdio_halinit: fix spaces preferred around that unary operator

This patch fixes below issues reported by checkpatch

CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '<<' (ctx:VxV)
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
------
changes in v2:  Send proper patch without corruption
----
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_halinit: fix comparison to true/false is error prone
Hariprasad Kelam [Fri, 14 Jun 2019 02:54:34 +0000 (08:24 +0530)]
staging: rtl8723bs: hal: sdio_halinit: fix comparison to true/false is error prone

fix below issues reported by checkpatch

CHECK: Using comparison to false is error prone
CHECK: Using comparison to true is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
----
changes in v2:      send proper patch without corruption
----
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove dead code in core.c
Simon Sandström [Thu, 13 Jun 2019 13:14:51 +0000 (15:14 +0200)]
staging: kpc2000: remove dead code in core.c

Fixes checkpatch warning: "Consider removing the code enclosed by
this #if 0 and its #endif".

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: deregister net and video config subsystems with configFS
Christian Gromm [Thu, 13 Jun 2019 15:23:47 +0000 (17:23 +0200)]
staging: most: deregister net and video config subsystems with configFS

This patch makes the modules net and video deregister its config subsystems
when the modules are removed from the kernel.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: android: fix style problem
Saiyam Doshi [Sat, 15 Jun 2019 18:46:05 +0000 (00:16 +0530)]
staging: android: fix style problem

checkpatch reported "WARNING: line over 80 characters".
This patch fixes it by aligning function arguments.

Signed-off-by: Saiyam Doshi <saiyamdoshi.in@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove rtw_btcoex_Initialize()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:39 +0000 (23:34 +0530)]
staging: rtl8723bs: Remove rtw_btcoex_Initialize()

Remove function rtw_btcoex_Initialize as the only thing it does is call
hal_btcoex_Initialize.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Replace function _InitQueuePriority()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:38 +0000 (23:34 +0530)]
staging: rtl8723bs: hal: Replace function _InitQueuePriority()

Remove function _InitQueuePriority as all it does it call
_InitNormalChipQueuePriority.
Rename _InitNormalChipQueuePriority to _InitQueuePriority for
compatibility with call site.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Fix typo in function name
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:37 +0000 (23:34 +0530)]
staging: rtl8723bs: Fix typo in function name

Change name of function hal_btcoex_Hanlder to hal_btcoex_Handler.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Remove function rtw_set_scan_deny_timer_hdl()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:36 +0000 (23:34 +0530)]
staging: rtl8723bs: Remove function rtw_set_scan_deny_timer_hdl()

Remove function rtw_set_scan_deny_timer_hdl as all it does is call
rtw_clear_scan_deny.
Modify call sites of rtw_set_scan_deny_timer_hdl to call
rtw_clear_scan_deny instead.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Replace function rtw_free_network_queue()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:35 +0000 (23:34 +0530)]
staging: rtl8723bs: Replace function rtw_free_network_queue()

Remove function rtw_free_network_queue as all it does is call
_rtw_free_network_queue.
Rename _rtw_free_network_queue to rtw_free_network_queue to maintain
compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove wrapper functions
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:34 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Remove wrapper functions

Remove function power_saving_wk_hdl as all it does is call
rtw_ps_processor. Edit call sites accordingly.
Remove function reset_securitypriv_hdl as all it does is call
rtw_reset_securitypriv. Modify call sites accordingly.
Remove function free_assoc_resources_hdl as all it does is call
rtw_free_assoc_resources with one extra constant argument, and the
former is only called once.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove function enable_rate_adaptive()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:33 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Remove function enable_rate_adaptive()

Remove function enable_rate_adaptive as all it does is call
Update_RA_Entry.
Modify the single callsite of enable_rate_adaptive to call
Update_RA_Entry directly instead.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Replace function Set_MSR()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:32 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Replace function Set_MSR()

Remove function Set_NETYPE0_MSR as it only has one line and it is only
called by one other function, Set_MSR.
Replace contents of Set_MSR with the contents of Set_NETYPE0_MSR as
Set_MSR does nothing except call Set_NETYPE0_MSR.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove eeprom_write16()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:31 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Remove eeprom_write16()

Remove unused function eeprom_write16.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove function read_eeprom_content()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:30 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Remove function read_eeprom_content()

Remove unused function read_eeprom_content.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove function eeprom_read_sz()
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:29 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Remove function eeprom_read_sz()

Remove unused function eeprom_read_sz.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: Change type of rtw_get_sec_ie()
Nishka Dasgupta [Wed, 12 Jun 2019 06:50:03 +0000 (12:20 +0530)]
staging: rtl8188eu: Change type of rtw_get_sec_ie()

Change return type of function rtw_get_sec_ie from int to void and
remove its return statement as the return value is never stored, checked
or otherwise used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: most: register net and video config subsystems with configFS
Christian Gromm [Wed, 12 Jun 2019 09:30:29 +0000 (11:30 +0200)]
staging: most: register net and video config subsystems with configFS

This patch makes the core components net and video register their config
subsystems with configFS. It is needed to have the configuration interface
of the modules exposed to user space.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Fixed CamelCase wkFilterRxFF0 renamed to wk_filter_rx_ff0
Deepak Mishra [Wed, 12 Jun 2019 04:51:31 +0000 (10:21 +0530)]
staging: rtl8712: Fixed CamelCase wkFilterRxFF0 renamed to wk_filter_rx_ff0

In process of cleaning up struct _adapter in drv_types.h, wkFilterRxFF0
     is renamed to to wk_filter_rx_ff0 to fix a checkpatch reported issue.

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Fixed CamelCase lockRxFF0Filter renamed to lock_rx_ff0_filter
Deepak Mishra [Wed, 12 Jun 2019 04:51:30 +0000 (10:21 +0530)]
staging: rtl8712: Fixed CamelCase lockRxFF0Filter renamed to lock_rx_ff0_filter

In process of cleaning up struct _adapter in drv_types.h, lockRxFF0Filter
 is renamed to to lock_rx_ff0_filter to fix a checkpatch reported issue.

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: Change return type to void from u8
Hariprasad Kelam [Tue, 11 Jun 2019 18:55:03 +0000 (00:25 +0530)]
staging: rtl8723bs: hal: Change return type to void from u8

The function HalQueryTxOQTBufferStatus8723BSdio always returns true and
caller functions are not bother about return status.

Change return type to void.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_ops: fix braces {} are not necessary for single stateme...
Hariprasad Kelam [Tue, 11 Jun 2019 18:22:30 +0000 (23:52 +0530)]
staging: rtl8723bs: hal: sdio_ops: fix braces {} are not necessary for single statement blocks

This patch fixes below issue reported by checkpatch

WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_ops: fix spaces preferred around unary operator
Hariprasad Kelam [Tue, 11 Jun 2019 18:22:06 +0000 (23:52 +0530)]
staging: rtl8723bs: hal: sdio_ops: fix spaces preferred around unary operator

CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_ops: fix Comparison to NULL
Hariprasad Kelam [Tue, 11 Jun 2019 18:21:42 +0000 (23:51 +0530)]
staging: rtl8723bs: hal: sdio_ops: fix Comparison to NULL

this patch fixes below warning reported by checkpatch

CHECK: Comparison to NULL could be written "c2h_evt"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: fix issue Comparison to NULL
Hariprasad Kelam [Tue, 11 Jun 2019 02:59:53 +0000 (08:29 +0530)]
staging: rtl8723bs: fix issue Comparison to NULL

This patch fixes below issues reported by checkpatch

CHECK: Comparison to NULL could be written "rtw_proc"
CHECK: Comparison to NULL could be written "!rtw_proc"
CHECK: Comparison to NULL could be written "!rtw_proc"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: fix spaces required around unary operator
Hariprasad Kelam [Mon, 10 Jun 2019 19:32:24 +0000 (01:02 +0530)]
staging: rtl8723bs: fix spaces required around unary operator

this patch fixes below issues reported by checkpatch

ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '<' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: remove the leading spaces
Li Mingshuo [Mon, 10 Jun 2019 14:30:26 +0000 (16:30 +0200)]
staging: rtl8712: remove the leading spaces

This patch fixes the checkpatch warning, removing leading spaces to make
sure that tabstop starts a new line.

Signed-off-by: Li Mingshuo <linuxli@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: os_dep: Remove variable pos
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:10 +0000 (13:17 +0530)]
staging: rtl8723bs: os_dep: Remove variable pos

Remove variable pos as it is not used after (or before) being assigned a
value.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: rtw_get_sec_ie(): Change return type
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:09 +0000 (13:17 +0530)]
staging: rtl8723bs: rtw_get_sec_ie(): Change return type

Remove assignment of return value of function rtw_get_sec_ie as it is
never checked or used.
Remove return statement of rtw_get_sec_ie as its return value is never
stored or checked or used.
Change return type of rtw_get_sec_ie to void.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:08 +0000 (13:17 +0530)]
staging: rtl8723bs: core: rtw_mlme_ext.c: Remove unused variables

Remove variables that are declared and assigned values but not otherwise
used.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: rtl8723b_cmd.c: Remove variables
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:07 +0000 (13:17 +0530)]
staging: rtl8723bs: hal: rtl8723b_cmd.c: Remove variables

Remove variables that are declared and initialised but never used.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: core: Remove variable change_priority
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:06 +0000 (13:17 +0530)]
staging: rtl8723bs: core: Remove variable change_priority

Remove local variable change_priority, as it takes the value of the
argument priority; as both of these variables are of type u8, priority
can be modified without changing the value of its copy at the call site.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: hal_btcoex.c: Remove variables
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:05 +0000 (13:17 +0530)]
staging: rtl8723bs: hal: hal_btcoex.c: Remove variables

Remove variables and use the values directly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: sdio_halinit.c: Remove variables
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:04 +0000 (13:17 +0530)]
staging: rtl8723bs: hal: sdio_halinit.c: Remove variables

Remove the variables RegRATR and RegRRSR as they are never used after
initialisation and assignment.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: os_dep: ioctl_linux.c: Remove return variables
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:03 +0000 (13:17 +0530)]
staging: rtl8723bs: os_dep: ioctl_linux.c: Remove return variables

Remove return variables and in multiple functions and return the values
directly, as the functions all return 0 in all cases.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Change type of rtw_os_recvbuf_resource_free()
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:02 +0000 (13:17 +0530)]
staging: rtl8723bs: Change type of rtw_os_recvbuf_resource_free()

Change return type of function rtw_os_recvbuf_resource_free to void as
its return value is never stored, checked or otherwise used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: Change type of rtw_os_recv_resource_alloc()
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:01 +0000 (13:17 +0530)]
staging: rtl8723bs: Change type of rtw_os_recv_resource_alloc()

Remove assignment of the return value of rtw_os_recv_resource_alloc as
this assignment at the call site is never used.
Remove return statement from rtw_os_recv_resource_alloc() as its return
variable is never used.
Change the type of the function to void.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Change return values of r8712_createbss_cmd()
Nishka Dasgupta [Mon, 10 Jun 2019 08:22:54 +0000 (13:52 +0530)]
staging: rtl8712: Change return values of r8712_createbss_cmd()

Change return values of r8712_createbss_cmd from _SUCCESS and _FAIL to 0
and -ENOMEM respectively.
Change return type of the function from unsigned to int to reflect this.
Change call site to check for 0 instead of _SUCCESS.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Change return values of r8712_setdatarate_cmd()
Nishka Dasgupta [Mon, 10 Jun 2019 08:22:53 +0000 (13:52 +0530)]
staging: rtl8712: Change return values of r8712_setdatarate_cmd()

Change the return values of function r8712_setdatarate_cmd from _SUCCESS
and _FAIL to 0 and -ENOMEM respectively.
Change the return type of the function from u8 to int to reflect this.
Change the call site of the function to check for 0 instead of _SUCCESS.
Return the value at the call site directly instead of storing it in a
return variable.
Remove now-unused return variable.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: removed DMA AIO implementation.
Jeremy Sowden [Thu, 13 Jun 2019 09:23:58 +0000 (10:23 +0100)]
staging: kpc2000: removed DMA AIO implementation.

The existing implementation for doing DMA via asynchronous IO didn't
work and there was no longer a use-case for it.  Removed it.

Fixed a few checkpatch warnings about too-long lines and extraneous
braces in the process.

Reported-by: Matt Sickler <matt.sickler@daktronics.com>
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove unnecessary comments in kp2000_pcie_probe
Simon Sandström [Wed, 12 Jun 2019 13:58:36 +0000 (15:58 +0200)]
staging: kpc2000: remove unnecessary comments in kp2000_pcie_probe

Much of the code comments in kp2000_pcie_probe just repeats the code and
does not add any additional information. Delete them and make sure that
comments still left in the function all use the same style.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: improve label names in kp2000_pcie_probe
Simon Sandström [Wed, 12 Jun 2019 13:58:35 +0000 (15:58 +0200)]
staging: kpc2000: improve label names in kp2000_pcie_probe

Use self-explanatory label names instead of the generic numbered ones,
to make it easier to follow and understand the code.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: kpc2000: kpc_dma: Make some symbols static
YueHaibing [Tue, 11 Jun 2019 13:42:28 +0000 (21:42 +0800)]
Staging: kpc2000: kpc_dma: Make some symbols static

Fix sparse warnings:

drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static?
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:84:1: warning: symbol 'dev_attr_engine_regs' was not declared. Should it be static?
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static?
drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: Fix: 'kpc_dma_del_device' and other symbols were not declared
Rishiraj Manwatkar [Tue, 11 Jun 2019 03:35:41 +0000 (03:35 +0000)]
staging: kpc2000: Fix: 'kpc_dma_del_device' and other symbols were not declared

This patch removes the Sparse generated warnings. Following warnings are reported by Sparse:
drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static?
drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static?
drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static?

Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: removed unused variables from struct _adapter
Deepak Mishra [Sun, 9 Jun 2019 12:31:43 +0000 (18:01 +0530)]
staging: rtl8712: removed unused variables from struct _adapter

This patch removed following unused member variables from struct _adapter

IsrContent, xmitThread, evtThread, recvThread

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Fixed CamelCase cmdThread rename to cmd_thread
Deepak Mishra [Sun, 9 Jun 2019 12:31:42 +0000 (18:01 +0530)]
staging: rtl8712: Fixed CamelCase cmdThread rename to cmd_thread

This patch renames CamelCase cmdThread to cmd_thread in struct _adapter in
drv_types.h and in os_intfs.c

This was reported by checkpatch.pl

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Removed redundant code from function oid_rt_pro_write_register_hdl
Deepak Mishra [Sun, 9 Jun 2019 12:31:41 +0000 (18:01 +0530)]
staging: rtl8712: Removed redundant code from function oid_rt_pro_write_register_hdl

In function oid_rt_pro_write_register_hdl, Adapter->ImrContent is
assigned with RegRWStruct->value but Adapter->ImrContent is never used
anywhere else. So those lines has no impact and are removed removed.

As that was the only place where ImrContent was used, so the member
variable is removed from the structure _adapter

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: Fixed CamelCase for EepromAddressSize
Deepak Mishra [Sun, 9 Jun 2019 12:31:40 +0000 (18:01 +0530)]
staging: rtl8712: Fixed CamelCase for EepromAddressSize

This patch renames CamelCase EepromAddressSizefrom to eeprom_address_size in
struct _adapter and in related files drv_types.h, rtl871x_eeprom.c, usb_intf.c

This was reported by checkpatch.pl

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: provide spaces around unary operators
Hariprasad Kelam [Sun, 9 Jun 2019 12:50:24 +0000 (18:20 +0530)]
staging: rtl8723bs: provide spaces around unary operators

This patch fixes below issues reported by checkpatch

CHECK: spaces preferred around that '-' (ctx:VxV)
+               skb_copy_bits(pfile->pkt, pfile->buf_len-pfile->pkt_len,
rmem, len);

CHECK: spaces preferred around that '*' (ctx:VxV)
+#define WMM_XMIT_THRESHOLD     (NR_XMITFRAME*2/5)
                                             ^

CHECK: spaces preferred around that '/' (ctx:VxV)
+#define WMM_XMIT_THRESHOLD     (NR_XMITFRAME*2/5)
                                               ^
CHECK: spaces preferred around that '/' (ctx:VxV)
+               if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME/4)) {
                                                                 ^

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: fix issue "Using comparison to true is error prone"
Hariprasad Kelam [Sun, 9 Jun 2019 12:49:53 +0000 (18:19 +0530)]
staging: rtl8723bs: fix issue "Using comparison to true is error prone"

this patch fixes below issue reported by checkpatch

CHECK: Using comparison to true is error prone
+                       if (res == true)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: fix warning comparison to NULL
Hariprasad Kelam [Sun, 9 Jun 2019 12:48:51 +0000 (18:18 +0530)]
staging: rtl8723bs: fix warning comparison to NULL

This patch fixes below issue reported by checkpatch

CHECK: Comparison to NULL could be written "!pxmitbuf->pallocated_buf"
+               if (pxmitbuf->pallocated_buf == NULL)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8723bs: hal: move common code to macro
Hariprasad Kelam [Sun, 9 Jun 2019 12:23:39 +0000 (17:53 +0530)]
staging: rtl8723bs: hal: move common code to macro

In halbtc8723b2ant_TdmaDurationAdjust function,below piece of code is
repeated many times.

halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, val);
pCoexDm->psTdmaDuAdjType = val;

So replace the same with "HAL_BTC8723B2ANT_DMA_DURATION_ADJUST" MACRO.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
-----
changes in v2: clean the changelog with proper indent
-----
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove unnecessary debug prints in kpc_dma_driver.c
Simon Sandström [Mon, 10 Jun 2019 08:44:32 +0000 (10:44 +0200)]
staging: kpc2000: remove unnecessary debug prints in kpc_dma_driver.c

Debug prints that are used only to inform about function entry or exit
can be removed as ftrace can be used to get this information.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove unnecessary debug prints in fileops.c
Simon Sandström [Mon, 10 Jun 2019 08:44:31 +0000 (10:44 +0200)]
staging: kpc2000: remove unnecessary debug prints in fileops.c

Debug prints that are used only to inform about function entry or exit
can be removed as ftrace can be used to get this information.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove unnecessary debug prints in dma.c
Simon Sandström [Mon, 10 Jun 2019 08:44:30 +0000 (10:44 +0200)]
staging: kpc2000: remove unnecessary debug prints in dma.c

Debug prints that are used only to inform about function entry or exit
can be removed as ftrace can be used to get this information.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove unnecessary debug prints in core.c
Simon Sandström [Mon, 10 Jun 2019 08:44:29 +0000 (10:44 +0200)]
staging: kpc2000: remove unnecessary debug prints in core.c

Debug prints that are used only to inform about function entry or exit
can be removed as ftrace can be used to get this information.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove unnecessary debug prints in cell_probe.c
Simon Sandström [Mon, 10 Jun 2019 08:44:28 +0000 (10:44 +0200)]
staging: kpc2000: remove unnecessary debug prints in cell_probe.c

Debug prints that are used only to inform about function entry or exit
can be removed as ftrace can be used to get this information.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: remove extra white space in kpc2000_spi.c
Naoto Kobayashi [Mon, 10 Jun 2019 05:43:14 +0000 (14:43 +0900)]
staging: kpc2000: remove extra white space in kpc2000_spi.c

Since whitespace should not appear between asterisk and
variable name in a declaration statement, remove it and
fix checkpatch.pl error "foo * bar" should be "foo *bar".

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO
YueHaibing [Tue, 28 May 2019 14:29:12 +0000 (22:29 +0800)]
staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO

Fix gcc build error while CONFIG_REGMAP_MMIO is not set

drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function `controller_probe':
arcx-anybus.c: undefined reference to `__devm_regmap_init_mmio_clk'

Select REGMAP_MMIO to fix it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 2411a336c8ce ("staging: fieldbus: arcx-anybus: change custom -> mmio regmap")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agoStaging: ralink-gdma: fixed a brace coding style issue
Harold André [Sun, 9 Jun 2019 10:58:46 +0000 (12:58 +0200)]
Staging: ralink-gdma: fixed a brace coding style issue

Fixed a coding style issue.

Signed-off-by: Harold André <harold.andre@gmx.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: kpc2000_i2c: add space after ,
Hao Xu [Sat, 8 Jun 2019 07:27:47 +0000 (15:27 +0800)]
staging: kpc2000: kpc2000_i2c: add space after ,

add space after , for #define outb_p(d,a) writeq(d,(void *)a)

Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: kpc2000: kpc2000_i2c: void* -> void *
Hao Xu [Sat, 8 Jun 2019 07:27:46 +0000 (15:27 +0800)]
staging: kpc2000: kpc2000_i2c: void* -> void *

modify void* to void * for #define inb_p(a) readq((void*)a)
and #define outb_p(d,a) writeq(d,(void*)a)

Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: make use of DBG_BUGON
Hariprasad Kelam [Sat, 8 Jun 2019 09:49:18 +0000 (15:19 +0530)]
staging: erofs: make use of DBG_BUGON

DBG_BUGON is introduced and it could only crash when EROFS_FS_DEBUG
(EROFS developping feature) is on.
replace BUG_ON with DBG_BUGON.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: erofs: fix warning Comparison to bool
Hariprasad Kelam [Sat, 8 Jun 2019 09:39:37 +0000 (15:09 +0530)]
staging: erofs: fix warning Comparison to bool

fix below warnings reported by coccicheck

drivers/staging/erofs/unzip_vle.c:332:11-18: WARNING: Comparison to bool

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work
Colin Ian King [Sat, 8 Jun 2019 11:50:31 +0000 (12:50 +0100)]
staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work

In the default event case switchdev_work is being leaked because
nothing is queued for work. Fix this by kfree'ing switchdev_work
before returning NOTIFY_DONE.

Addresses-Coverity: ("Resource leak")
Fixes: 44baaa43d7cc ("staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8188eu: core: Replace function rtw_free_network_nolock()
Nishka Dasgupta [Fri, 7 Jun 2019 14:10:03 +0000 (19:40 +0530)]
staging: rtl8188eu: core: Replace function rtw_free_network_nolock()

Remove function rtw_free_network_nolock, as all it does is call
_rtw_free_network_nolock, and rename _rtw_free_network_nolock to
rtw_free_network_nolock.
Keep the new rtw_free_network_nolock a static function and remove the
old version from the header file.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: usb_halinit.c: Remove p from variable names
Nishka Dasgupta [Fri, 7 Jun 2019 05:52:09 +0000 (11:22 +0530)]
staging: rtl8712: usb_halinit.c: Remove p from variable names

Remove leading 'p' from the names of the following pointer variables:
    - padapter
    - precvbuf
    - pintfhdl
    - pregistrypriv
    - precvpriv.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: usb_ops.c: Remove leading p from variable names
Nishka Dasgupta [Fri, 7 Jun 2019 05:52:08 +0000 (11:22 +0530)]
staging: rtl8712: usb_ops.c: Remove leading p from variable names

Remove leading 'p' from the names of the following pointer variables:
- pintfhdl
- pintf_hdl (renamed to intfhdl in keeping with the convention in other
functions)
- poption
- pops
- pintfpriv.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: xmit_linux.c: Remove leading p from variable names
Nishka Dasgupta [Fri, 7 Jun 2019 05:52:06 +0000 (11:22 +0530)]
staging: rtl8712: xmit_linux.c: Remove leading p from variable names

Remove leading p from the names of the following pointer variables:
- padapter
- pxmitpriv
- pnetdev
- pxmitframe.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>