platform/kernel/linux-starfive.git
2 years agostaging: r8188eu: clean up rtw_rf.c
Michael Straube [Tue, 22 Feb 2022 08:28:47 +0000 (09:28 +0100)]
staging: r8188eu: clean up rtw_rf.c

Remove unnecessary includes and the unused define _RTW_RF_C_ from
rtw_rf.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220222082847.6687-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: refactor rtw_ch2freq()
Michael Straube [Tue, 22 Feb 2022 08:28:46 +0000 (09:28 +0100)]
staging: r8188eu: refactor rtw_ch2freq()

Convert the array ch_freq_map to a simple integer array and use
the indices as channel numbers. This simplifies the code and avoids
looping through the array to get the frequency. To avoid out of
bounds array access return a default value for invalid channel values,
like the original code did.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220222082847.6687-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove 5 GHz channels from ch_freq_map
Michael Straube [Tue, 22 Feb 2022 08:28:45 +0000 (09:28 +0100)]
staging: r8188eu: remove 5 GHz channels from ch_freq_map

According to the Realtek documentation the chips this driver supports
are 2.4 GHz only chips. Frequencies for 5 GHz channels can be removed
from the ch_freq_map array.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220222082847.6687-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused variable from UpdateHalRAMask8188EUsb
Phillip Potter [Tue, 22 Feb 2022 23:35:06 +0000 (23:35 +0000)]
staging: r8188eu: remove unused variable from UpdateHalRAMask8188EUsb

Remove the 'arg' variable from the block inside the if statement in the
UpdateHalRAMask8188EUsb function in hal/usb_halinit.c, as due to the
recent DBG_88E cleanup series, this is now set but not used. Also remove
the rest of the lines in this block that further modify 'arg' as they
are superfluous, due to it never being used afterwards.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220222233506.72778-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6656: Remove unnecessary line breaks
Philipp Hortmann [Mon, 21 Feb 2022 21:25:29 +0000 (22:25 +0100)]
staging: vt6656: Remove unnecessary line breaks

This patch fixes the checkpatch.pl warning like:
CHECK: Lines should not end with a '('

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e0d6d3d787051e3aef56fdba1aee8c2bbbe14e89.1645477326.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6656: Remove ftrace-like logging
Philipp Hortmann [Mon, 21 Feb 2022 21:25:23 +0000 (22:25 +0100)]
staging: vt6656: Remove ftrace-like logging

This patch fixes the checkpatch.pl warning like:
WARNING: Unnecessary ftrace-like logging - prefer using ftrace

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/084064a5c94aad940600ae62d6c21bb26629cb2c.1645477326.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6656: Change macro to function and moved to better file
Philipp Hortmann [Mon, 21 Feb 2022 21:25:16 +0000 (22:25 +0100)]
staging: vt6656: Change macro to function and moved to better file

This patch fixes the checkpatch.pl warning like:
- CHECK: Macro argument reuse 'uVar' - possible side-effects?
Moved the only twice used function to the file where it is used.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fa37dde640cfe5093ff23ca0881aba4673751a49.1645477326.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6656: Fix CamelCase warnings in macro
Philipp Hortmann [Mon, 21 Feb 2022 21:25:10 +0000 (22:25 +0100)]
staging: vt6656: Fix CamelCase warnings in macro

This patch fixes the checkpatch.pl warnings like:
- CHECK: Avoid CamelCase: <uVar>

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/53072a97348b08276b083ce18188b9199cbfaae6.1645477326.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6656: Add comment for locks
Philipp Hortmann [Mon, 21 Feb 2022 21:25:05 +0000 (22:25 +0100)]
staging: vt6656: Add comment for locks

This patch fixes the checkpatch.pl warnings like:
- CHECK: spinlock_t definition without comment

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/c6a5ef8e7704b488c54145b09ac44bd4880c13b4.1645477326.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6656: Fix CamelCase warnings in mac.h and mac.c
Philipp Hortmann [Mon, 21 Feb 2022 21:24:59 +0000 (22:24 +0100)]
staging: vt6656: Fix CamelCase warnings in mac.h and mac.c

This patch fixes the checkpatch.pl warnings like:
CHECK: Avoid CamelCase: <EnCFG_BBType_a>
175: FILE: drivers/staging/vt6656/mac.h:175:
+#define EnCFG_BBType_a 0x00
and affected places in mac.c

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/d04b36cc5446d1c996ac8bc71ff391d822cedd9d.1645477326.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: check the return value of devm_kmalloc()
Xiaoke Wang [Tue, 22 Feb 2022 02:00:24 +0000 (10:00 +0800)]
staging: wfx: check the return value of devm_kmalloc()

devm_kmalloc() returns a pointer to allocated memory on success, NULL
on failure. While there is a memory allocation of devm_kmalloc()
without proper check. It is better to check the return value of it to
prevent wrong memory access.
And I use the err label which is introduced by the previous patch to
handle the error.

Link: https://lore.kernel.org/r/tencent_24A24A3EFF61206ECCC4B94B1C5C1454E108@qq.com
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_D9887936F780A393C232DC48C9EC3F1D4405@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unnecessary braces in if statements
Marcelo Aloisio da Silva [Sun, 20 Feb 2022 17:41:50 +0000 (14:41 -0300)]
staging: r8188eu: remove unnecessary braces in if statements

Braces are not necessary for single statement blocks.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
Link: https://lore.kernel.org/r/20220220174150.GA11496@snoopy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: use BIT macro instead of left shifting
Moses Christopher Bollavarapu [Sat, 19 Feb 2022 18:32:34 +0000 (19:32 +0100)]
staging: rtl8192e: use BIT macro instead of left shifting

There is a BIT(nr) macro available in vdso/bits.h
which is doing the same left shift operation

Example: (1 << 7) == BIT(7)

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Moses Christopher Bollavarapu <mosescb.dev@gmail.com>
Link: https://lore.kernel.org/r/20220219183234.31216-1-mosescb.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: move open brace to the previous line
Marcelo Aloisio da Silva [Sun, 20 Feb 2022 18:04:34 +0000 (15:04 -0300)]
staging: r8188eu: move open brace to the previous line

Fix the following error reported by checkpatch.pl:

ERROR: that open brace { should be on the previous line
+ if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
+ {

Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
Link: https://lore.kernel.org/r/20220220180434.GA12386@snoopy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused aes tables from rtw_security.c
Michael Straube [Sun, 20 Feb 2022 19:52:54 +0000 (20:52 +0100)]
staging: r8188eu: remove unused aes tables from rtw_security.c

Remove unused aes tables from rtw_security.c and, while at it,
remove unused extern declarations from rtw_security.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220195254.11759-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused macros from rtw_security.h
Michael Straube [Sun, 20 Feb 2022 19:52:53 +0000 (20:52 +0100)]
staging: r8188eu: remove unused macros from rtw_security.h

There are lots of unused macros in the rtw_security.h header.
Remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220195254.11759-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_CmnInfoUpdate()
Michael Straube [Sun, 20 Feb 2022 10:02:12 +0000 (11:02 +0100)]
staging: r8188eu: remove ODM_CmnInfoUpdate()

Each case in ODM_CmnInfoUpdate() just sets a single variable. Set the
variables directly and remove ODM_CmnInfoUpdate().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220100212.7466-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: convert type of pBandWidth in odm_dm_struct
Michael Straube [Sun, 20 Feb 2022 10:02:11 +0000 (11:02 +0100)]
staging: r8188eu: convert type of pBandWidth in odm_dm_struct

The variable pBandWidth in odm_dm_struct stores constants from enum
ht_channel_width. Change the type of pBandWidth from u8 pointer to
enum ht_channel_width pointer to get rid of a type cast in function
Update_ODM_ComInfo_88E().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220100212.7466-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove enum odm_bw
Michael Straube [Sun, 20 Feb 2022 10:02:10 +0000 (11:02 +0100)]
staging: r8188eu: remove enum odm_bw

The enums odm_bw and ht_channel_width are redundant. Keep
ht_channel_width and remove odm_bw.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220100212.7466-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: convert two u8 variables to bool
Michael Straube [Sun, 20 Feb 2022 10:02:09 +0000 (11:02 +0100)]
staging: r8188eu: convert two u8 variables to bool

The variables bScanInProcess in struct mlme_priv and bpower_saving in
struct pwrctrl_priv are both unsed to store only boolean values true
and false. Convert them from u8 to bool to avoid type casts in the
function Update_ODM_ComInfo_88E().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220100212.7466-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ODM_CmnInfoHook()
Michael Straube [Sun, 20 Feb 2022 10:02:08 +0000 (11:02 +0100)]
staging: r8188eu: remove ODM_CmnInfoHook()

Each case in ODM_CmnInfoHook() just sets a single variable. Set the
variables directly and remove ODM_CmnInfoHook().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220220100212.7466-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: NumQryPhyStatusOFDM is set but not used
Martin Kaiser [Fri, 18 Feb 2022 09:30:34 +0000 (10:30 +0100)]
staging: r8188eu: NumQryPhyStatusOFDM is set but not used

NumQryPhyStatusOFDM in struct odm_phy_dbg_info is set but not used.
Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220218093034.854049-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: NumQryPhyStatusCCK is set but not used
Martin Kaiser [Fri, 18 Feb 2022 09:30:33 +0000 (10:30 +0100)]
staging: r8188eu: NumQryPhyStatusCCK is set but not used

NumQryPhyStatusCCK in struct odm_phy_dbg_info is set but not used.
Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220218093034.854049-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: RxSNR is set but not used
Martin Kaiser [Fri, 18 Feb 2022 09:30:32 +0000 (10:30 +0100)]
staging: r8188eu: RxSNR is set but not used

The RxSNR array in struct phy_info is set but not used.
Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220218093034.854049-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: RxMIMOSignalQuality is set but not used
Martin Kaiser [Fri, 18 Feb 2022 09:30:31 +0000 (10:30 +0100)]
staging: r8188eu: RxMIMOSignalQuality is set but not used

The RxMIMOSignalQuality array in struct signal_stat is set but
not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220218093034.854049-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: move out assignment in if condition
Marcelo Aloisio da Silva [Fri, 18 Feb 2022 04:01:40 +0000 (01:01 -0300)]
staging: r8188eu: move out assignment in if condition

Should not use assignment in if condition.

Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
Link: https://lore.kernel.org/r/20220218040140.GA22796@snoopy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: qlge: add unregister_netdev in qlge_probe
Hangyu Hua [Mon, 21 Feb 2022 08:55:52 +0000 (16:55 +0800)]
staging: qlge: add unregister_netdev in qlge_probe

unregister_netdev need to be called when register_netdev succeeds
qlge_health_create_reporters fails.

Fixes: d8827ae8e22b ("staging: qlge: deal with the case that devlink_health_reporter_create fails")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20220221085552.93561-1-hbh25y@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: fix an error handling in wfx_init_common()
Xiaoke Wang [Fri, 18 Feb 2022 13:59:45 +0000 (21:59 +0800)]
staging: wfx: fix an error handling in wfx_init_common()

One error handler of wfx_init_common() return without calling
ieee80211_free_hw(hw), which may result in memory leak. And I add
one err label to unify the error handler, which is useful for the
subsequent changes.

Suggested-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com>
Link: https://lore.kernel.org/r/tencent_24A24A3EFF61206ECCC4B94B1C5C1454E108@qq.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: fix scan with WFM200 and WW regulation
Riccardo Ferrazzo [Fri, 18 Feb 2022 10:53:58 +0000 (11:53 +0100)]
staging: wfx: fix scan with WFM200 and WW regulation

Some variants of the WF200 disallow active scan on channel 12 and 13.
For these parts, the channels 12 and 13 are marked IEEE80211_CHAN_NO_IR.

However, the beacon hint procedure was removing the flag
IEEE80211_CHAN_NO_IR from channels where a BSS is discovered. This was
making subsequent scans to fail because the driver was trying active
scans on prohibited channels.

Signed-off-by: Riccardo Ferrazzo <rferrazzo@came.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220218105358.283769-1-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: correct long line warnings near prior DBG_88E calls
Phillip Potter [Wed, 16 Feb 2022 01:07:09 +0000 (01:07 +0000)]
staging: r8188eu: correct long line warnings near prior DBG_88E calls

Where it is possible (without out-of-patch-series-scope large scale
refactoring), correct code to remove checkpatch warnings about lines
that are too long, also correcting operator spacing where appropriate
for these lines as well. These warnings occur mostly due to so many
DBG_88E removals and parentheses tweaks etc. being adjacent to such
long lines, which are therefore included in the resultant diff.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-16-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove padapter param from aes_decipher function
Phillip Potter [Wed, 16 Feb 2022 01:07:08 +0000 (01:07 +0000)]
staging: r8188eu: remove padapter param from aes_decipher function

Remove padapter parameter from aes_decipher function in
core/rtw_security.c, as I added it previously during debugging tweaks
and it is no longer required.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-15-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove rtw_sctx_chk_waring_status function
Phillip Potter [Wed, 16 Feb 2022 01:07:07 +0000 (01:07 +0000)]
staging: r8188eu: remove rtw_sctx_chk_waring_status function

Remove the rtw_sctx_chk_waring_status function from core/rtw_amit.c,
as it has only one caller which is unnecessary.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-14-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: fix lines modified by DBG_88E cleanup
Phillip Potter [Wed, 16 Feb 2022 01:07:06 +0000 (01:07 +0000)]
staging: r8188eu: fix lines modified by DBG_88E cleanup

A number of style problems were left behind by the DBG_88E cleanup:
(1) Empty if/else blocks.
(2) Parenthesised if/while statements containing only one line.
(3) Entire blocks which server zero purpose after removal of DBG_88E.
(4) Various warnings about whitespace, and constant comparison order.
(5) Use of __constant_htons instead when htons should be used.

Fix up these issues across the driver in any file touched by the
previous cleanup. Long line warnings will be addresses in a later
patch.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-13-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove rtw_debug module parameter
Phillip Potter [Wed, 16 Feb 2022 01:07:05 +0000 (01:07 +0000)]
staging: r8188eu: remove rtw_debug module parameter

Remove rtw_debug module parameter, and also the internal GlobalDebugLevel
flag and all places where it is referenced. As hal/odm_debug.c is now
essentially empty, also remove this file and edit the Makefile to no
longer reference it. The DBG_88E macro was the last user of these and
has now been removed, making the parameter and flag redundant.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-12-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove DBG_88E macro definition
Phillip Potter [Wed, 16 Feb 2022 01:07:04 +0000 (01:07 +0000)]
staging: r8188eu: remove DBG_88E macro definition

Remove DBG_88E macro definition as it has no remaining callers within
the driver. This is part of the ongoing effort to cleanup the driver to
use standard debug mechanisms where appropriate.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-11-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove all aliased DBG_88E calls
Phillip Potter [Wed, 16 Feb 2022 01:07:03 +0000 (01:07 +0000)]
staging: r8188eu: remove all aliased DBG_88E calls

Remove all remaining calls to preprocessor aliases of DBG_88E, as well
as these definitions themselves. This is a prerequisite for removing
the DBG_88E macro itself.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-10-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove remaining DBG_88E call from include/usb_ops.h
Phillip Potter [Wed, 16 Feb 2022 01:07:02 +0000 (01:07 +0000)]
staging: r8188eu: remove remaining DBG_88E call from include/usb_ops.h

Remove the one remaining DBG_88E call from include/usb_ops.h. After
some thought, it makes more sense to just entirely strip all of these
calls, so that debugging code in the driver can be more consistent and
useful going forwards.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-9-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove remaining DBG_88E calls from os_dep subdir
Phillip Potter [Wed, 16 Feb 2022 01:07:01 +0000 (01:07 +0000)]
staging: r8188eu: remove remaining DBG_88E calls from os_dep subdir

Remove all remaining DBG_88E calls from the os_dep subdirectory. After
some thought, it makes more sense to just entirely strip all of these
calls, so that debugging code in the driver can be more consistent and
useful going forwards.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-8-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove DBG_88E calls from os_dep/ioctl_linux.c
Phillip Potter [Wed, 16 Feb 2022 01:07:00 +0000 (01:07 +0000)]
staging: r8188eu: remove DBG_88E calls from os_dep/ioctl_linux.c

Remove all remaining DBG_88E calls from os_dep/ioctl_linux.c, patching
separately from the rest of the os_dep subdirectory for ease of review
due to the sheer number of calls. After some thought, it makes more
sense to just entirely strip all of these calls, so that debugging
code in the driver can be more consistent and useful going forwards.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-7-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove DBG_88E calls from hal subdir
Phillip Potter [Wed, 16 Feb 2022 01:06:59 +0000 (01:06 +0000)]
staging: r8188eu: remove DBG_88E calls from hal subdir

Remove all remaining DBG_88E calls from the hal subdirectory. After some
thought, it makes more sense to just entirely strip all of these calls,
so that debugging code in the driver can be more consistent and useful
going forwards.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-6-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove DBG_88E calls from core subdir
Phillip Potter [Wed, 16 Feb 2022 01:06:58 +0000 (01:06 +0000)]
staging: r8188eu: remove DBG_88E calls from core subdir

Remove all remaining DBG_88E calls from the core subdirectory. After some
thought, it makes more sense to just entirely strip all of these calls,
so that debugging code in the driver can be more consistent and useful
going forwards.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-5-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove converted DBG_88E calls from core/rtw_mlme_ext.c
Phillip Potter [Wed, 16 Feb 2022 01:06:57 +0000 (01:06 +0000)]
staging: r8188eu: remove converted DBG_88E calls from core/rtw_mlme_ext.c

Remove all the netdev_dbg/pr_debug calls that were previously converted
from DBG_88E inside core/rtw_mlme_ext.c. Due to the sheer number of
lines, this patch is separated out for ease of review. After some thought,
it makes more sense to just entirely strip all of these calls, so that
debugging code in the driver can be more consistent and useful going
forwards.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-4-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove smaller sets of converted DBG_88E calls
Phillip Potter [Wed, 16 Feb 2022 01:06:56 +0000 (01:06 +0000)]
staging: r8188eu: remove smaller sets of converted DBG_88E calls

Remove all the smaller sets of dev_dbg/netdev_dbg/pr_debug calls that
were previously converted from DBG_88E. After some thought, it makes
more sense to just entirely strip all of these calls, so that debugging
code in the driver can be more consistent and useful going forwards.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-3-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove previously converted DBG_88E_LEVEL calls
Phillip Potter [Wed, 16 Feb 2022 01:06:55 +0000 (01:06 +0000)]
staging: r8188eu: remove previously converted DBG_88E_LEVEL calls

Remove all netdev_dbg and dev_dbg calls that were previously converted
from DBG_88E_LEVEL. After some thought, it makes more sense to just
entirely strip all of these calls, so that debugging code in the driver
can be more consistent and useful going forwards.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-2-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: struct usb_suspend_parm is not used
Martin Kaiser [Wed, 16 Feb 2022 08:16:57 +0000 (09:16 +0100)]
staging: r8188eu: struct usb_suspend_parm is not used

struct usb_suspend_parm is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220216081657.622467-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: evt_done_cnt is set but not used
Martin Kaiser [Wed, 16 Feb 2022 08:16:56 +0000 (09:16 +0100)]
staging: r8188eu: evt_done_cnt is set but not used

evt_done_cnt in struct evt_priv is set but not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220216081657.622467-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: evt_allocated_buf is not used
Martin Kaiser [Wed, 16 Feb 2022 08:16:55 +0000 (09:16 +0100)]
staging: r8188eu: evt_allocated_buf is not used

evt_allocated_buf in struct evt_priv is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220216081657.622467-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: Fix spelling mistake "unexpectly" -> "unexpectedly"
Colin Ian King [Thu, 17 Feb 2022 10:47:47 +0000 (10:47 +0000)]
staging: wfx: Fix spelling mistake "unexpectly" -> "unexpectedly"

There is a spelling mistake in a dev_warn message. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220217104747.15424-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: fix DT bindings location
Jérôme Pouiller [Thu, 17 Feb 2022 10:32:48 +0000 (11:32 +0100)]
staging: wfx: fix DT bindings location

Currently, the DT bindings the wfx driver cannot be processed by make
dt_binding_check. We need to place it somewhere into
Documentation/devicetree/bindings/.

After that change, we are able to get warnings from dt_binding_check and
fix them.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220217103248.183770-1-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: apply the necessary SDIO quirks for the Silabs WF200
Jérôme Pouiller [Wed, 16 Feb 2022 09:31:12 +0000 (10:31 +0100)]
staging: wfx: apply the necessary SDIO quirks for the Silabs WF200

Until now, the SDIO quirks are applied directly from the driver.
However, it is better to apply the quirks before driver probing. So,
this patch relocate the quirks in the MMC framework.

Note that the WF200 has no valid SDIO VID/PID. Therefore, we match DT
rather than on the SDIO VID/PID.

Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220216093112.92469-3-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: WF200 has no official SDIO IDs
Jérôme Pouiller [Wed, 16 Feb 2022 09:31:11 +0000 (10:31 +0100)]
staging: wfx: WF200 has no official SDIO IDs

Some may think that SDIO_VENDOR_ID_SILABS / SDIO_DEVICE_ID_SILABS_WF200
are official SDIO IDs. However, it is not the case, the values used by
WF200 are not official (BTW, the driver rely on the DT rather than on
the SDIO IDs to probe the device).

To avoid any confusion, remove the definitions SDIO_*_ID_SILABS* and use
raw values.

Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220216093112.92469-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: rename CCKSwingTable_Ch1_Ch13
Michael Straube [Wed, 16 Feb 2022 19:40:38 +0000 (20:40 +0100)]
staging: r8188eu: rename CCKSwingTable_Ch1_Ch13

After removing CCKSwingTable_Ch14 there is only one table left and we
can rename CCKSwingTable_Ch1_Ch13 to simply cck_swing_table.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220216194038.6762-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: bCCKinCH14 is read-only
Michael Straube [Wed, 16 Feb 2022 19:40:37 +0000 (20:40 +0100)]
staging: r8188eu: bCCKinCH14 is read-only

The variable bCCKinCH14 in struct odm_rf_cal is never set. It stays
at its default value 0. Remove bCCKinCH14 from struct odm_rf_cal and
remove related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220216194038.6762-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused enum
Michael Straube [Wed, 16 Feb 2022 19:40:36 +0000 (20:40 +0100)]
staging: r8188eu: remove unused enum

Remove an unused enum from usb_halinit.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220216194038.6762-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unconditional if statement
Marcelo Aloisio da Silva [Tue, 15 Feb 2022 02:39:26 +0000 (23:39 -0300)]
staging: r8188eu: remove unconditional if statement

Remove if condition that is always true. It is useless and
makes the code less readable.

Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com>
Link: https://lore.kernel.org/r/20220215023926.GA52339@snoopy
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused macros in sta_info.h
Abdun Nihaal [Wed, 9 Feb 2022 16:36:07 +0000 (22:06 +0530)]
staging: r8188eu: remove unused macros in sta_info.h

Some of the sta_* and STA_* macros are not used.
Remove those unused macros.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/c2453078b2d46119d167f2d0e4690cc87fc4b77e.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused argument in chk_ap_is_alive
Abdun Nihaal [Wed, 9 Feb 2022 16:36:06 +0000 (22:06 +0530)]
staging: r8188eu: remove unused argument in chk_ap_is_alive

The function argument padapter is not used in chk_ap_is_alive.
Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/17af206986d64f34e85acdf67b138edb4ccc0312.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused argument in on_action_public_default
Abdun Nihaal [Wed, 9 Feb 2022 16:36:05 +0000 (22:06 +0530)]
staging: r8188eu: remove unused argument in on_action_public_default

The function argument action is not used in on_action_public_default.
Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/01c8fd82c21ae96773c9099a2cee3c3fd29c1054.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused argument in __nat25_has_expired
Abdun Nihaal [Wed, 9 Feb 2022 16:36:04 +0000 (22:06 +0530)]
staging: r8188eu: remove unused argument in __nat25_has_expired

The argument priv is not used in function __nat25_has_expired. Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/eceb38329e108c1e440eb973492a5a1c17bd7927.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove empty function __nat25_db_print
Abdun Nihaal [Wed, 9 Feb 2022 16:36:03 +0000 (22:06 +0530)]
staging: r8188eu: remove empty function __nat25_db_print

The definition of function __nat25_db_print is empty. Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/98d201e029dba9acf707ed020b5a5604029ca710.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove empty function _InitOperationMode
Abdun Nihaal [Wed, 9 Feb 2022 16:36:02 +0000 (22:06 +0530)]
staging: r8188eu: remove empty function _InitOperationMode

The definition of function _InitOperationMode is empty. Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/07083cbb8b09957d2fcf9e5b70e0fd832ce53f35.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove empty function rtw_mfree_mlme_priv_lock
Abdun Nihaal [Wed, 9 Feb 2022 16:36:01 +0000 (22:06 +0530)]
staging: r8188eu: remove empty function rtw_mfree_mlme_priv_lock

The definition of function rtw_mfree_mlme_priv_lock is empty. Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/8b6d750b049f875370996258aedaf89cf0f198d4.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove empty function rtw_get_encrypt_decrypt_from_registrypriv
Abdun Nihaal [Wed, 9 Feb 2022 16:36:00 +0000 (22:06 +0530)]
staging: r8188eu: remove empty function rtw_get_encrypt_decrypt_from_registrypriv

The definition of function rtw_get_encrypt_decrypt_from_registrypriv is
empty. Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/3d84df54e73b49464d2a0732b44acdb71687b3b1.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused struct zero_bulkout_context
Abdun Nihaal [Wed, 9 Feb 2022 16:35:59 +0000 (22:05 +0530)]
staging: r8188eu: remove unused struct zero_bulkout_context

struct zero_bulkout_context is not used. Remove it.

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/05b72a7b045a829de6f706295d17c9f0d5fa5e2f.1644422181.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: mark _rtw_free_sta_priv as void
Vihas Makwana [Sun, 13 Feb 2022 17:34:26 +0000 (23:04 +0530)]
staging: r8188eu: mark _rtw_free_sta_priv as void

_rtw_free_sta_priv() always returns _SUCCESS and it's return value
isn't checked either.
So it makes sense to mark it as void instead of u32.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220213173424.39935-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Arınç ÜNAL [Tue, 15 Feb 2022 08:17:25 +0000 (11:17 +0300)]
staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1

GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the
rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node without rgmii2_pins on
the GB-PC1 devicetree.

Tested-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20220215081725.3463-2-arinc.unal@arinc9.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet
Arınç ÜNAL [Tue, 15 Feb 2022 08:17:24 +0000 (11:17 +0300)]
staging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet

Fix pinctrl-0 items under the ethernet node to be size-1 items.
Current notation would be used on specifications with non-zero cells.

Fixes: 0a93c0d75809 ("staging: mt7621-dts: fix pinctrl properties for ethernet")
Reported-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Link: https://lore.kernel.org/r/20220215081725.3463-1-arinc.unal@arinc9.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: we only need one struct bb_reg_def for path a
Martin Kaiser [Sat, 12 Feb 2022 16:17:37 +0000 (17:17 +0100)]
staging: r8188eu: we only need one struct bb_reg_def for path a

The r8188eu driver does no longer access rf path b registers via
PHYRegDef.

Change the PHYRegDef array in struct hal_data_8188e to a single
variable that holds the register addresses for rf path a. Remove
the initialisation of path b register addresses.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove path parameter from phy_RFSerialRead
Martin Kaiser [Sat, 12 Feb 2022 16:17:36 +0000 (17:17 +0100)]
staging: r8188eu: remove path parameter from phy_RFSerialRead

All callers of phy_RFSerialRead set the eRFPath parameter to
RF_PATH_A. Remove the parameter and use RF_PATH_A directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove path parameter from rtl8188e_PHY_QueryRFReg
Martin Kaiser [Sat, 12 Feb 2022 16:17:35 +0000 (17:17 +0100)]
staging: r8188eu: remove path parameter from rtl8188e_PHY_QueryRFReg

All callers of rtl8188e_PHY_QueryRFReg set the eRFPath parameter
to RF_PATH_A. Remove the parameter and use RF_PATH_A directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: limit rtw_dbg_port to path a
Martin Kaiser [Sat, 12 Feb 2022 16:17:34 +0000 (17:17 +0100)]
staging: r8188eu: limit rtw_dbg_port to path a

Rf registers can be read by rtw_wx_read_rf or via the private ioctl 0x0B.
The latter calls rtw_dbg_port. Limit rf register reads to path a in
rtw_debug_port.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: limit rtw_wx_read_rf to path a
Martin Kaiser [Sat, 12 Feb 2022 16:17:33 +0000 (17:17 +0100)]
staging: r8188eu: limit rtw_wx_read_rf to path a

Commit 3b011b097c38 ("staging: r8188eu: limit rf register writes to
path a") limits rf register writes by private ioctls to RF_PATH_A.
Apart from private ioctls, the rest of the driver uses only path a.

This patch limits rf register reads by the private ioctl 0x0D, which
calls rtw_wx_read_rf, to path a.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: clarify that bb_reg_dump uses only path a
Martin Kaiser [Sat, 12 Feb 2022 16:17:32 +0000 (17:17 +0100)]
staging: r8188eu: clarify that bb_reg_dump uses only path a

The path variable is always 0 in bb_reg_dump. Remove the path variable
and replace the constant 0 with RF_PATH_A to make it clearer that path
a is used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove path parameter from phy_RFSerialWrite
Martin Kaiser [Sat, 12 Feb 2022 16:17:31 +0000 (17:17 +0100)]
staging: r8188eu: remove path parameter from phy_RFSerialWrite

The only caller of phy_RFSerialWrite sets the eRFPath parameter
to RF_PATH_A. Remove the parameter and use RF_PATH_A directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove path parameter from rtl8188e_PHY_SetRFReg
Martin Kaiser [Sat, 12 Feb 2022 16:17:30 +0000 (17:17 +0100)]
staging: r8188eu: remove path parameter from rtl8188e_PHY_SetRFReg

All callers of rtl8188e_PHY_SetRFReg set the eRFPath parameter
to RF_PATH_A. Remove the parameter and use RF_PATH_A directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: write only path a registers in rtw_dbg_port
Martin Kaiser [Sat, 12 Feb 2022 16:17:29 +0000 (17:17 +0100)]
staging: r8188eu: write only path a registers in rtw_dbg_port

Commit 3b011b097c38 ("staging: r8188eu: limit rf register writes to
path a") limited the rtw_wx_write_rf function to write only rf registers
for path a.

The private ioctl 0x0B invokes the rtw_dbg_port function. This ioctl
can also be used for writing rf registers. We should limit these register
writes to rf path a as well.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: set path a explicitly
Martin Kaiser [Sat, 12 Feb 2022 16:17:28 +0000 (17:17 +0100)]
staging: r8188eu: set path a explicitly

We've already limited the rtw_wx_write_rf function to RF_PATH_A in commit
3b011b097c38 ("staging: r8188eu: limit rf register writes to path a").

Set RF_PATH_A explicitly when we call rtl8188e_PHY_SetRFReg. This will
make it easier later to verify that all callers of rtl8188e_PHY_SetRFReg
use path a.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220212161737.381841-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused enums from ieee80211.h
Michael Straube [Thu, 10 Feb 2022 10:16:23 +0000 (11:16 +0100)]
staging: r8188eu: remove unused enums from ieee80211.h

There are some unused enums in the ieee80211.h header. Remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220210101623.13758-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused structs from ieee80211.h
Michael Straube [Thu, 10 Feb 2022 10:16:22 +0000 (11:16 +0100)]
staging: r8188eu: remove unused structs from ieee80211.h

There are lots of unused structures in the ieee80211.h header.
Remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220210101623.13758-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove ishighspeed from dvobj_priv
Martin Kaiser [Wed, 9 Feb 2022 19:28:42 +0000 (20:28 +0100)]
staging: r8188eu: remove ishighspeed from dvobj_priv

There's no need to store the usb device speed in struct dvobj_priv.
We can read the speed from struct usb_device. dvobj_priv has a pointer
to the usb_device.

Reorder one if-statement to make the code clearer.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220209192842.99399-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: clean up enum hw_variables
Michael Straube [Wed, 9 Feb 2022 07:36:18 +0000 (08:36 +0100)]
staging: r8188eu: clean up enum hw_variables

Remove unused constants from enum hw_variables.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220209073618.29725-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused enum
Michael Straube [Wed, 9 Feb 2022 07:36:17 +0000 (08:36 +0100)]
staging: r8188eu: remove unused enum

Remove an unused enum from rtl8188e_hal_init.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220209073618.29725-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: Use sizeof dereferenced pointer in kzalloc()
Fabio M. De Francesco [Tue, 8 Feb 2022 18:04:25 +0000 (19:04 +0100)]
staging: r8188eu: Use sizeof dereferenced pointer in kzalloc()

checkpatch.pl emits the following warning:

CHECK: Prefer kzalloc(sizeof(*pcmd)...) over kzalloc(sizeof(struct cmd_obj)...)
+       pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);

CHECK: Prefer kzalloc(sizeof(*psetkeyparm)...) over kzalloc(sizeof(struct setkey_parm)...)
+       psetkeyparm = kzalloc(sizeof(struct setkey_parm), GFP_KERNEL).

According to the above "CHECK[S]", use the preferred style in the two kzalloc()
of rtw_set_key().

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20220208180426.27455-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: keep the success path and error path separate
Vihas Makwana [Wed, 9 Feb 2022 19:07:53 +0000 (00:37 +0530)]
staging: r8188eu: keep the success path and error path separate

Keep the success path and error path separate in rtw_usb_if1_init() and
drop the "status" variable.
Also, remove do-nothing gotos.

Reviewed-by: Pavel Skripkin <paskripkin@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220209190752.7232-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agoclk: ralink: make system controller node a reset provider
Sergio Paracuellos [Thu, 10 Feb 2022 09:48:59 +0000 (10:48 +0100)]
clk: ralink: make system controller node a reset provider

MT7621 system controller node is already providing the clocks for the whole
system but must also serve as a reset provider. Hence, add reset controller
related code to the clock driver itself. To get resets properly ready for
the rest of the world we need to move platform driver initialization process
to 'arch_initcall'.

CC: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20220210094859.927868-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agodt-bindings: clock: mediatek,mt7621-sysc: add '#reset-cells' property
Sergio Paracuellos [Thu, 10 Feb 2022 09:48:58 +0000 (10:48 +0100)]
dt-bindings: clock: mediatek,mt7621-sysc: add '#reset-cells' property

Make system controller a reset provider for all the peripherals in the
MT7621 SoC adding '#reset-cells' property.

Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20220210094859.927868-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove useless if else
Jiapeng Chong [Fri, 11 Feb 2022 08:03:22 +0000 (16:03 +0800)]
staging: r8188eu: remove useless if else

Eliminate the follow coccicheck warning:

./drivers/staging/r8188eu/hal/usb_halinit.c:1105:3-5: WARNING: possible
condition with no effect (if == else).

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220211080322.80388-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: greybus: Remove redundant 'flush_workqueue()' calls
Minghao Chi (CGEL ZTE) [Thu, 10 Feb 2022 06:02:05 +0000 (06:02 +0000)]
staging: greybus: Remove redundant 'flush_workqueue()' calls

'destroy_workqueue()' already drains the queue before destroying it,
so there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220210060205.1607792-1-chi.minghao@zte.com.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging/ks7010: Remove redundant 'flush_workqueue()' calls
Minghao Chi (CGEL ZTE) [Thu, 10 Feb 2022 06:04:11 +0000 (06:04 +0000)]
staging/ks7010: Remove redundant 'flush_workqueue()' calls

'destroy_workqueue()' already drains the queue before destroying it,
so there is no need to flush it explicitly.

Remove the redundant 'flush_workqueue()' calls.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220210060411.1607928-1-chi.minghao@zte.com.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: most: net: Make use of the helper macro LIST_HEAD()
Cai Huoqing [Wed, 9 Feb 2022 03:26:43 +0000 (11:26 +0800)]
staging: most: net: Make use of the helper macro LIST_HEAD()

Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
Link: https://lore.kernel.org/r/20220209032645.38305-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: most: video: Make use of the helper macro LIST_HEAD()
Cai Huoqing [Wed, 9 Feb 2022 03:27:13 +0000 (11:27 +0800)]
staging: most: video: Make use of the helper macro LIST_HEAD()

Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.

Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
Link: https://lore.kernel.org/r/20220209032715.38437-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: remove support for legacy PDS format
Jérôme Pouiller [Fri, 11 Feb 2022 16:26:59 +0000 (17:26 +0100)]
staging: wfx: remove support for legacy PDS format

We don't want to support legacy PDS format.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20220211162659.528333-3-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: wfx: allow new PDS format
Jérôme Pouiller [Fri, 11 Feb 2022 16:26:58 +0000 (17:26 +0100)]
staging: wfx: allow new PDS format

The device needs data about the antenna configuration. This information
in provided by PDS (Platform Data Set, this is the wording used in WF200
documentation) files.

Until now, the driver had to parse the PDS file before to send it. This
solution was not acceptable for the vanilla kernel. We have slightly
changed the PDS format so it is now an array of Type-Length-Value.

This patch allows to support new format and keep compatibility with
legacy format.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
probe: allow new PDS format
Link: https://lore.kernel.org/r/20220211162659.528333-2-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agoMerge 5.17-rc4 into staging-testing
Greg Kroah-Hartman [Mon, 14 Feb 2022 08:02:51 +0000 (09:02 +0100)]
Merge 5.17-rc4 into staging-testing

We need the staging driver fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agoLinux 5.17-rc4
Linus Torvalds [Sun, 13 Feb 2022 20:13:30 +0000 (12:13 -0800)]
Linux 5.17-rc4

2 years agoMerge tag 'kbuild-fixes-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 13 Feb 2022 19:58:11 +0000 (11:58 -0800)]
Merge tag 'kbuild-fixes-v5.17-2' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Fix the truncated path issue for HAVE_GCC_PLUGINS test in Kconfig

 - Move -Wunsligned-access to W=1 builds to avoid sprinkling warnings
   for the latest Clang

 - Fix missing fclose() in Kconfig

 - Fix Kconfig to touch dep headers correctly when KCONFIG_AUTOCONFIG is
   overridden.

* tag 'kbuild-fixes-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: fix failing to generate auto.conf
  kconfig: fix missing fclose() on error paths
  Makefile.extrawarn: Move -Wunaligned-access to W=1
  kconfig: let 'shell' return enough output for deep path names

2 years agoMerge tag 'irq-urgent-2022-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 13 Feb 2022 18:06:40 +0000 (10:06 -0800)]
Merge tag 'irq-urgent-2022-02-13' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "Interrupt chip driver fixes:

   - Don't install an hotplug notifier for GICV3-ITS on systems which do
     not need it to prevent a warning in the notifier about inconsistent
     state

   - Add the missing device tree matching for the T-HEAD PLIC variant so
     the related SoC is properly supported"

* tag 'irq-urgent-2022-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/sifive-plic: Add missing thead,c900-plic match string
  dt-bindings: update riscv plic compatible string
  irqchip/gic-v3-its: Skip HP notifier when no ITS is registered

2 years agoMerge tag 'objtool_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 13 Feb 2022 17:43:34 +0000 (09:43 -0800)]
Merge tag 'objtool_urgent_for_v5.17_rc4' of git://git./linux/kernel/git/tip/tip

Pull objtool fix from Borislav Petkov:
 "Fix a case where objtool would mistakenly warn about instructions
  being unreachable"

* tag 'objtool_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/bug: Merge annotate_reachable() into _BUG_FLAGS() asm

2 years agoMerge tag 'sched_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 13 Feb 2022 17:27:26 +0000 (09:27 -0800)]
Merge tag 'sched_urgent_for_v5.17_rc4' of git://git./linux/kernel/git/tip/tip

Pull scheduler fix from Borislav Petkov:
 "Fix a NULL-ptr dereference when recalculating a sched entity's weight"

* tag 'sched_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/fair: Fix fault in reweight_entity

2 years agoMerge tag 'perf_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 13 Feb 2022 17:25:26 +0000 (09:25 -0800)]
Merge tag 'perf_urgent_for_v5.17_rc4' of git://git./linux/kernel/git/tip/tip

Pull perf fix from Borislav Petkov:
 "Prevent cgroup event list corruption when switching events"

* tag 'perf_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix list corruption in perf_cgroup_switch()