linux.git
3 years agostaging: r8188eu: remove the _cancel_workitem_sync wrapper
Martin Kaiser [Thu, 25 Nov 2021 16:25:12 +0000 (17:25 +0100)]
staging: r8188eu: remove the _cancel_workitem_sync wrapper

Remove the _cancel_workitem_sync wrapper and call
cancel_work_sync directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125162513.25039-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove the _init_workitem wrapper
Martin Kaiser [Thu, 25 Nov 2021 16:25:11 +0000 (17:25 +0100)]
staging: r8188eu: remove the _init_workitem wrapper

Remove the _init_workitem wrapper and call INIT_WORK directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125162513.25039-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove the _set_workitem wrapper
Martin Kaiser [Thu, 25 Nov 2021 16:25:10 +0000 (17:25 +0100)]
staging: r8188eu: remove the _set_workitem wrapper

Remove the _set_workitem wrapper and call schedule_work directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125162513.25039-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: hal data's board type is unused
Martin Kaiser [Thu, 25 Nov 2021 15:14:36 +0000 (16:14 +0100)]
staging: r8188eu: hal data's board type is unused

BoardType in struct hal_data_8188e is not used. Remove the variable and the
function to extract the board type from the efuses.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove unused eeprom defines
Martin Kaiser [Thu, 25 Nov 2021 15:14:35 +0000 (16:14 +0100)]
staging: r8188eu: remove unused eeprom defines

Remove a number of eeprom defines which are not used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: do not extract eeprom version from the fuses
Martin Kaiser [Thu, 25 Nov 2021 15:14:34 +0000 (16:14 +0100)]
staging: r8188eu: do not extract eeprom version from the fuses

EEPROMVersion in struct hal_data_8188e is not used. There's no need to
parse the fuses and extract the version.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove unused efuse defines
Martin Kaiser [Thu, 25 Nov 2021 15:14:33 +0000 (16:14 +0100)]
staging: r8188eu: remove unused efuse defines

This patch removes some unused defines, macros and include statements
related to efuses.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: efuse_WordEnableDataRead is not used
Martin Kaiser [Thu, 25 Nov 2021 15:14:32 +0000 (16:14 +0100)]
staging: r8188eu: efuse_WordEnableDataRead is not used

The efuse_WordEnableDataRead function is not used and can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: Efuse_CalculateWordCnts is not used
Martin Kaiser [Thu, 25 Nov 2021 15:14:31 +0000 (16:14 +0100)]
staging: r8188eu: Efuse_CalculateWordCnts is not used

Remove the Efuse_CalculateWordCnts function, which is not used.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211125151436.5895-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: use max() and min() macros
Vihas Mak [Wed, 24 Nov 2021 19:04:36 +0000 (00:34 +0530)]
staging: r8188eu: use max() and min() macros

use max() and min() macros to fix following cocci warnings:

drivers/staging/r8188eu/core/rtw_wlan_util.c:719: WARNING opportunity for min()
drivers/staging/r8188eu/core/rtw_wlan_util.c:724: WARNING opportunity for max()

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Mak <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20211124190436.251312-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: refactor camelcase byMaxPwrLevel to max_pwr_level
Alberto Merciai [Fri, 19 Nov 2021 08:16:56 +0000 (09:16 +0100)]
staging: vt6655: refactor camelcase byMaxPwrLevel to max_pwr_level

Replace hungarian notated variable "byMaxPwrLevel" with "max_pwr_level"
compliant with linux kernel coding style.

Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
Link: https://lore.kernel.org/r/20211119081656.GA12982@alb3rt0-VirtualBox
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: rename variable bHWRadioOff
Alberto Merciai [Sun, 21 Nov 2021 11:19:59 +0000 (12:19 +0100)]
staging: vt6655: rename variable bHWRadioOff

Replace camelcase hungarian notated variable "bHWRadioOff"
into linux kernel coding style equivalent variable "hw_radio_off".

Tested-by: Tommaso Merciai <tomm.merciai@gmail.com>
Acked-by: Tommaso Merciai <tommaso.merciai@gmail.com>
Acked-by: Tommaso Merciai <tomm.merciai@gmail.com>
Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
Link: https://lore.kernel.org/r/20211121112000.632456-1-alb3rt0.m3rciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: remove superfluous static_assert statement
Gaston Gonzalez [Mon, 22 Nov 2021 13:09:26 +0000 (10:09 -0300)]
staging: vchiq_core: remove superfluous static_assert statement

After removing the BITSET_T typedef in commit d8a364820e01 ("staging:
vchiq_core: get rid of typedef") the static_assert statement becomes superfluous
as now we are checking if the size of the u32 type is 4 bytes. Hence, just
remove the static_assert statement.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/20211122130926.342128-1-gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove rf_type from HT_caps_handler()
Michael Straube [Fri, 19 Nov 2021 12:26:35 +0000 (13:26 +0100)]
staging: r8188eu: remove rf_type from HT_caps_handler()

rf_type is always RF_1T1R. Remove it from HT_caps_handler() and
remove related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211119122635.28435-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove rf_type from add_RATid()
Michael Straube [Fri, 19 Nov 2021 12:26:34 +0000 (13:26 +0100)]
staging: r8188eu: remove rf_type from add_RATid()

rf_type is always RF_1T1R. Remove it from add_RATid() and remove
related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211119122635.28435-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove rf_type from rtw_mcs_rate()
Michael Straube [Thu, 18 Nov 2021 21:50:52 +0000 (22:50 +0100)]
staging: r8188eu: remove rf_type from rtw_mcs_rate()

rf_type is always RF_1T1R. Remove it from rtw_mcs_rate() and remove
related dead code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211118215052.5215-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: Remove support for devices with 8188FU chipset (0bda:f179)
Candy Febriyanto [Thu, 18 Nov 2021 16:37:34 +0000 (23:37 +0700)]
staging: r8188eu: Remove support for devices with 8188FU chipset (0bda:f179)

The new r8188eu driver doesn't actually support devices with vendor ID 0bda
and product ID f179[0][1][2], remove the ID so owners of these devices
don't have to blacklist the staging driver.

[0] https://github.com/lwfinger/rtl8188eu/issues/366#issuecomment-888511731
[1] https://github.com/lwfinger/rtl8188eu/issues/385
[2] https://github.com/lwfinger/rtl8188eu/issues/385#issuecomment-973013539

Cc: Larry Finger <Larry.Finger@lwfinger.net>
CC: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Candy Febriyanto <cfebriyanto@gmail.com>
Link: https://lore.kernel.org/r/YZaBTq9vlMaJDFz2@mainframe.localdomain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: unisys: visornic: removed a blank line at the end of function
Liu Junqi [Thu, 25 Nov 2021 04:47:29 +0000 (12:47 +0800)]
staging: unisys: visornic: removed a blank line at the end of function

Removed a blank line at the end of function to clear checkpatch warning
and make it more like typical coding style.

Signed-off-by: Liu Junqi <liujunqi@pku.edu.cn>
Link: https://lore.kernel.org/r/20211125044729.594727-3-liujunqi@pku.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: unisys: visornic: reindent to avoid '(' at the end of line
Liu Junqi [Thu, 25 Nov 2021 04:47:28 +0000 (12:47 +0800)]
staging: unisys: visornic: reindent to avoid '(' at the end of line

A change to make the code more like typical coding style.

Signed-off-by: Liu Junqi <liujunqi@pku.edu.cn>
Link: https://lore.kernel.org/r/20211125044729.594727-2-liujunqi@pku.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: unisys: visornic: fixed a typo cant -> can't
Liu Junqi [Thu, 25 Nov 2021 04:47:27 +0000 (12:47 +0800)]
staging: unisys: visornic: fixed a typo cant -> can't

Fixed a typo: cant -> can't in visornic_main.c.

Signed-off-by: Liu Junqi <liujunqi@pku.edu.cn>
Link: https://lore.kernel.org/r/20211125044729.594727-1-liujunqi@pku.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: unisys: visorhba: use tab to indent instead of whitespace
Liu Junqi [Thu, 18 Nov 2021 03:37:38 +0000 (11:37 +0800)]
staging: unisys: visorhba: use tab to indent instead of whitespace

changed the whitespace to tab to comply with kernel coding style.

Signed-off-by: Liu Junqi <liujunqi@pku.edu.cn>
Link: https://lore.kernel.org/r/20211118033737.576775-1-liujunqi@pku.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: delete unused header
Zameer Manji [Tue, 16 Nov 2021 19:35:41 +0000 (19:35 +0000)]
staging: r8188eu: delete unused header

The iee80211_ext.h header is unused and can be removed.

Signed-off-by: Zameer Manji <zmanji@gmail.com>
Link: https://lore.kernel.org/r/20211116193557.1188939-1-zmanji@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: code indent should use tabs
Michael Straube [Wed, 17 Nov 2021 07:20:07 +0000 (08:20 +0100)]
staging: r8188eu: code indent should use tabs

Replace spaces with tab to clear the following checkpatch issues.

usb_intf.c:38: ERROR: code indent should use tabs where possible
usb_intf.c:38: WARNING: please, no spaces at the start of a line

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211117072007.19924-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove unused defines in wifi.h
Zameer Manji [Tue, 16 Nov 2021 01:14:33 +0000 (01:14 +0000)]
staging: r8188eu: remove unused defines in wifi.h

None of these defines in wifi.h are used so they
can be safely removed.

Reviewed-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Zameer Manji <zmanji@gmail.com>
Link: https://lore.kernel.org/r/20211116011451.896714-1-zmanji@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: fix array_size.cocci warning
Guo Zhengkui [Tue, 16 Nov 2021 06:41:07 +0000 (14:41 +0800)]
staging: r8188eu: fix array_size.cocci warning

Fix following array_size.cocci warning:
./drivers/staging/r8188eu/core/rtw_rf.c:38:48-49: WARNING: Use ARRAY_SIZE.

ARRAY_SIZE() defined in <linux/kernel.h> is safer because it uses
__must_be_array().

Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20211116064124.8833-2-guozhengkui@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Delete bogus check for `init_count` in AL7230
Karolina Drobnik [Mon, 15 Nov 2021 10:55:49 +0000 (10:55 +0000)]
staging: vt6655: Delete bogus check for `init_count` in AL7230

Remove an unnecessary check in `rf_write_wake_prog_syn` in `RF_AIROHA7230`
switch case. This `if` conditional will never be true as `init_count` is
equal to 18 and can't be bigger than `MISCFIFO_SYNDATASIZE - 0`, which
is equal to 21.

Suggested-by: Mike Rapoport <mike.rapoport@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/e10d2278975116e03a699260f2259f9ab87501a5.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Delete bogus check for `init_count` in AL2230
Karolina Drobnik [Mon, 15 Nov 2021 10:55:48 +0000 (10:55 +0000)]
staging: vt6655: Delete bogus check for `init_count` in AL2230

Remove an unnecessary check in `rf_write_wake_prog_syn` in `RF_AL2230S`
switch case. This `if` conditional will never be true as `init_count` is
equal to 17 and can't be bigger than `MISCFIFO_SYNDATASIZE - 0`, which
is equal to 21.

Suggested-by: Mike Rapoport <mike.rapoport@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/29c758ba58b10bc1da7e864b3a4f377147fc4428.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Update comment for `rf_write_wake_prog_syn`
Karolina Drobnik [Mon, 15 Nov 2021 10:55:47 +0000 (10:55 +0000)]
staging: vt6655: Update comment for `rf_write_wake_prog_syn`

Change the function description to include the actual parameters.
Update the comment on the return type.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/be06c8f0df043598f3280a15397ad66aabefeaf4.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Rename `RFvWriteWakeProgSyn` function
Karolina Drobnik [Mon, 15 Nov 2021 10:55:46 +0000 (10:55 +0000)]
staging: vt6655: Rename `RFvWriteWakeProgSyn` function

To align with the kernel coding style, remove the type from
the function name and do not use CamelCase.

Fix issue detected by checkpatch.pl:
  CHECK: Avoid CamelCase: <RFvWriteWakeProgSyn>

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/29899f738b4f381a2b3f01fd0748e9b96f835239.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Rewrite conditional in AL7320 initialization
Karolina Drobnik [Mon, 15 Nov 2021 10:55:45 +0000 (10:55 +0000)]
staging: vt6655: Rewrite conditional in AL7320 initialization

Use conditional operator to determine which table for AL7320
initialization should be used. Introduce `init_table` variable
to store this value.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/28169210bc26d5fcc1080ed18dc8e043bc3ef30b.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Use incrementation in `idx`
Karolina Drobnik [Mon, 15 Nov 2021 10:55:44 +0000 (10:55 +0000)]
staging: vt6655: Use incrementation in `idx`

Increment `idx` in a loop instead of adding the loop counter
`i` to do so. Delete increments of `i` that were rendered
unnecessary by this change.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/9affeaf40ddb31e03b21db9acd099db4d80da179.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Introduce `idx` variable
Karolina Drobnik [Mon, 15 Nov 2021 10:55:43 +0000 (10:55 +0000)]
staging: vt6655: Introduce `idx` variable

Add a local variable to store `MISCFIFO_SYNDATA_IDX` offset.
This change helps in shortening the lines in `rf.c` that
are deemed too long by checkpatch.pl.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/596ae9bc980379860b5b1785b3ecc88e18121103.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: Remove unnecessary type casts
Karolina Drobnik [Mon, 15 Nov 2021 10:55:42 +0000 (10:55 +0000)]
staging: vt6655: Remove unnecessary type casts

Remove casts to unsigned short in `RFvWriteWakeProgSyn` function as they are
not needed.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
Link: https://lore.kernel.org/r/c9a5718479deda078b582cbc42a4e7b2f3a6cb39.1636729147.git.karolinadrobnik@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove the efuse_hal structure
Martin Kaiser [Sat, 13 Nov 2021 18:55:18 +0000 (19:55 +0100)]
staging: r8188eu: remove the efuse_hal structure

struct efuse_hal is not used and can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-16-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove fake efuse variables
Martin Kaiser [Sat, 13 Nov 2021 18:55:17 +0000 (19:55 +0100)]
staging: r8188eu: remove fake efuse variables

We removed the pseudo read code. This patch removes the fake efuse arrays
that were used by pseudo reads.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove bt efuse definitions
Martin Kaiser [Sat, 13 Nov 2021 18:55:16 +0000 (19:55 +0100)]
staging: r8188eu: remove bt efuse definitions

This driver does not use bt efuses. Remove global variables and
definitions related to bt efuses.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: efuse_OneByteWrite is unused
Martin Kaiser [Sat, 13 Nov 2021 18:55:15 +0000 (19:55 +0100)]
staging: r8188eu: efuse_OneByteWrite is unused

Remove the efuse_OneByteWrite function, which is no longer used.
Remove resulting dead code as well.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: efuse_OneByteRead is unused
Martin Kaiser [Sat, 13 Nov 2021 18:55:14 +0000 (19:55 +0100)]
staging: r8188eu: efuse_OneByteRead is unused

Remove the efuse_OneByteRead function, which is no longer used.
Remove resulting dead code as well.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove defines for efuse type
Martin Kaiser [Sat, 13 Nov 2021 18:55:13 +0000 (19:55 +0100)]
staging: r8188eu: remove defines for efuse type

We've removed all code to handle efuse types. The last step is to
remove the defines for bt and wifi efuse types.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: rtl8188e_EFUSE_GetEfuseDefinition is unused
Martin Kaiser [Sat, 13 Nov 2021 18:55:12 +0000 (19:55 +0100)]
staging: r8188eu: rtl8188e_EFUSE_GetEfuseDefinition is unused

Now that we use the map length directly, rtl8188e_EFUSE_GetEfuseDefinition
is no longer needed and can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: use efuse map length define directly
Martin Kaiser [Sat, 13 Nov 2021 18:55:11 +0000 (19:55 +0100)]
staging: r8188eu: use efuse map length define directly

The length of the efuse data section is constant. We can use the
corresponding define directly, there's no need to get the length
from rtl8188e_EFUSE_GetEfuseDefinition.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: merge Efuse_ReadAllMap into EFUSE_ShadowMapUpdate
Martin Kaiser [Sat, 13 Nov 2021 18:55:10 +0000 (19:55 +0100)]
staging: r8188eu: merge Efuse_ReadAllMap into EFUSE_ShadowMapUpdate

Efuse_ReadAllMap is small, it's called only by EFUSE_ShadowMapUpdate.
This patch merges the two functions.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: rtl8188e_Efuse_PgPacketRead is now unused
Martin Kaiser [Sat, 13 Nov 2021 18:55:09 +0000 (19:55 +0100)]
staging: r8188eu: rtl8188e_Efuse_PgPacketRead is now unused

After we removed efuse write support, rtl8188e_Efuse_PgPacketRead is no
longer needed. Remove this function and its internal helpers.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: rtl8188e_EfuseGetCurrentSize is now unused
Martin Kaiser [Sat, 13 Nov 2021 18:55:08 +0000 (19:55 +0100)]
staging: r8188eu: rtl8188e_EfuseGetCurrentSize is now unused

After we removed efuse write support, rtl8188e_EfuseGetCurrentSize is no
longer needed. Remove this function and its internal helpers.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: merge small adapter info helpers
Martin Kaiser [Sat, 13 Nov 2021 18:55:07 +0000 (19:55 +0100)]
staging: r8188eu: merge small adapter info helpers

ReadAdapterInfo8188EU calls Hal_InitPGData88E and readAdapterInfo_8188EU,
both of which are small and have no other callers. Merge the two latter
functions into ReadAdapterInfo8188EU.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove test code for efuse shadow map
Martin Kaiser [Sat, 13 Nov 2021 18:55:06 +0000 (19:55 +0100)]
staging: r8188eu: remove test code for efuse shadow map

The EFUSE_ShadowMapUpdate function has a parameter to replace the
actual read operations with test reads. The only caller of
EFUSE_ShadowMapUpdate does not use this test mode.

Remove the read test code from EFUSE_ShadowMapUpdate and the low-level
functions that it calls.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove efuse type from read functions
Martin Kaiser [Sat, 13 Nov 2021 18:55:05 +0000 (19:55 +0100)]
staging: r8188eu: remove efuse type from read functions

Efuse_ReadAllMap, ReadEFuseByIC and ReadEFuse_Pseudo do not use their
efuseType parameter. Remove the parameter from these functions and
from their callers.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove efuse type from definition functions
Martin Kaiser [Sat, 13 Nov 2021 18:55:04 +0000 (19:55 +0100)]
staging: r8188eu: remove efuse type from definition functions

Hal_EFUSEGetEfuseDefinition88E and Hal_EFUSEGetEfuseDefinition_Pseudo88E
do not use their efuseType parameter.

Remove the parameter from these functions and from their callers.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211113185518.23941-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: mt7621-dts: remove 'gdma' and 'hsdma' nodes
Sergio Paracuellos [Sat, 13 Nov 2021 19:20:45 +0000 (20:20 +0100)]
staging: mt7621-dts: remove 'gdma' and 'hsdma' nodes

Drivers related with 'gdma' and 'hsdma' nodes are not in-tree. Remove them
from the device tree file.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20211113192045.32153-4-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: mt7621-dma: remove driver from tree
Sergio Paracuellos [Sat, 13 Nov 2021 19:20:44 +0000 (20:20 +0100)]
staging: mt7621-dma: remove driver from tree

This driver was a added a time ago and there is no special effort or work
to clean it and any progress at all to mainline it. Also, there is already
a driver from Mediatek in 'drivers/dma/mediatek/mtk-hsdma.c' which looks
pretty similar to this. So the way of supporting HSDMA for mt7621 would be
to modify that driver instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20211113192045.32153-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: ralink-gdma: remove driver from tree
Sergio Paracuellos [Sat, 13 Nov 2021 19:20:43 +0000 (20:20 +0100)]
staging: ralink-gdma: remove driver from tree

This driver was a added a time ago and there is no special effort or work
to clean it and any progress at all to mainline it. Also, the main user of
this dma controller seems to be 'i2s' in mt7621 SoCs. There is no in-tree
driver at all for the 'i2s' and its related device tree node has also been
deleted from main device tree file. Hence, remove this driver also for
completeness.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20211113192045.32153-2-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: wlan-ng: Removed unused comments
Gabriel Goller [Fri, 12 Nov 2021 20:35:52 +0000 (21:35 +0100)]
staging: wlan-ng: Removed unused comments

Removed commented-out code pieces that are unnecessary.

Signed-off-by: Gabriel Goller <gabrielgoller123@gmail.com>
Link: https://lore.kernel.org/r/YY7QKNB7egKuTC36@desktop
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: fix camelcase in bRadioOff
Tommaso Merciai [Sat, 13 Nov 2021 10:21:20 +0000 (11:21 +0100)]
staging: vt6655: fix camelcase in bRadioOff

Replace camel case variable bRadioOff with snake case
variable radio_off.
Drop Hungarian notation prefix in `bRadioOff` variable.
Change it to use snake case.

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Link: https://lore.kernel.org/r/20211113102126.82904-1-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: simplify two boolean assignments
Martin Kaiser [Thu, 11 Nov 2021 21:26:44 +0000 (22:26 +0100)]
staging: r8188eu: simplify two boolean assignments

There's no need to use the ? operator and to set true and
false explicitly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: merge three small functions
Martin Kaiser [Thu, 11 Nov 2021 21:26:43 +0000 (22:26 +0100)]
staging: r8188eu: merge three small functions

ReadAdapterInfo8188EU calls _ReadAdapterInfo8188EU.
_ReadAdapterInfo8188EU calls _ReadPROMContent.

Each of these functions is small and has only one caller. Move all
their code into ReadAdapterInfo8188EU.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: rf_chip is constant
Martin Kaiser [Thu, 11 Nov 2021 21:26:42 +0000 (22:26 +0100)]
staging: r8188eu: rf_chip is constant

For this driver, rf_chip is always RF_6052. Remove the rf_chip component
from struct hal_data_8188e and resulting dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove autoload check
Martin Kaiser [Thu, 11 Nov 2021 21:26:41 +0000 (22:26 +0100)]
staging: r8188eu: remove autoload check

In Hal_InitPGData88E, the same code is run, regardless of
bautoload_fail_flag.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove haldata's EEPROMSubCustomerID
Martin Kaiser [Thu, 11 Nov 2021 21:26:40 +0000 (22:26 +0100)]
staging: r8188eu: remove haldata's EEPROMSubCustomerID

It is used only in a (disabled) debug print.

We can now remove two functions that parsed eeprom info and populated
haldata components.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove haldata's EEPROMCustomerID
Martin Kaiser [Thu, 11 Nov 2021 21:26:39 +0000 (22:26 +0100)]
staging: r8188eu: remove haldata's EEPROMCustomerID

It is used only in a (disabled) debug print.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove haldata's EEPROMVID / PID
Martin Kaiser [Thu, 11 Nov 2021 21:26:38 +0000 (22:26 +0100)]
staging: r8188eu: remove haldata's EEPROMVID / PID

They are used only in a (disabled) debug print.

In practice, lsusb can be used to read the actual vid and pid.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211111212644.9011-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192u: remove the if condition without effect
Saurav Girepunje [Mon, 8 Nov 2021 04:11:22 +0000 (09:41 +0530)]
staging: rtl8192u: remove the if condition without effect

In function rtl8192_adapter_start priv->pFirmware->firmware_status
is assign to FW_STATUS_0_INIT just after assignment variable is
again get check for same value. Therefore if condition will be
always be true. So remove the if condition ,else if section and
else section which will never get execute.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYijapuGOmObwM3S@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: core: avoid unnecessary if condition
Saurav Girepunje [Sun, 7 Nov 2021 18:08:30 +0000 (23:38 +0530)]
staging: rtl8723bs: core: avoid unnecessary if condition

In function rtw_lps_change_dtim_hdl remove the if condition check
to compare the pwrpriv->dtim to dtim . If both are not equal dtim
is getting assign to pwrpriv->dtim. But if both are equal assigning
dtim to pwrpriv->dtim will not make any difference on value. So remove
the unnecessary if condition check.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYgWHt+PpyqOv40R@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: os_dep: Change the return type of function
Saurav Girepunje [Sun, 7 Nov 2021 16:43:10 +0000 (22:13 +0530)]
staging: r8188eu: os_dep: Change the return type of function

Change the return type of rtw_init_default_value function
from u8 to void. This function always return success. This
is called from rtw_init_drv_sw where the return value from
this function is assign to local variable but the local variable
value is never checked. After change the return type to void
remove the local variable ret8 in rtw_init_drv_sw function.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYgCHkVXFQ4r9dVp@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove efuse write functions
Martin Kaiser [Sun, 7 Nov 2021 16:16:24 +0000 (17:16 +0100)]
staging: r8188eu: remove efuse write functions

The r8188eu driver in its current state does not need write access
to the efuses. Only read access is required to get the chip id, the
mac address and other settings.

This patch removes a lot of unused code for writing the efuses.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211107161624.9452-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove write support from rtl8188e_EfusePowerSwitch
Martin Kaiser [Sun, 7 Nov 2021 16:16:23 +0000 (17:16 +0100)]
staging: r8188eu: remove write support from rtl8188e_EfusePowerSwitch

The rtl8188e_EfusePowerSwitch function has a write parameter that is
set to false by its callers.

Remove the parameter and resulting dead code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211107161624.9452-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: clean up _PHY_PathADDAOn
Martin Kaiser [Sun, 7 Nov 2021 14:31:00 +0000 (15:31 +0100)]
staging: r8188eu: clean up _PHY_PathADDAOn

The only caller sets isPathAOn = true and is2t = false. Remove the
parameters and resulting dead code.

Make the function static, it's used only inside HalPhyRf_8188e.c.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211107143100.9047-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove constant phy_IQCalibrate_8188E parameter
Martin Kaiser [Sun, 7 Nov 2021 14:30:59 +0000 (15:30 +0100)]
staging: r8188eu: remove constant phy_IQCalibrate_8188E parameter

The only caller of phy_IQCalibrate_8188E sets the is2t parameter
to false.

Remove the parameter and resulting dead code. This includes the
phy_PathB_IQK_8188E and _PHY_PathAStandBy functions.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211107143100.9047-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove unused phy_PathA_RxIQK parameter
Martin Kaiser [Sun, 7 Nov 2021 14:30:58 +0000 (15:30 +0100)]
staging: r8188eu: remove unused phy_PathA_RxIQK parameter

phy_PathA_RxIQK does not use its configPathB parameter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211107143100.9047-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove unused phy_PathA_IQK_8188E parameter
Martin Kaiser [Sun, 7 Nov 2021 14:30:57 +0000 (15:30 +0100)]
staging: r8188eu: remove unused phy_PathA_IQK_8188E parameter

The phy_PathA_IQK_8188E function does not use its configPathB
parameter. It can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211107143100.9047-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: pi433: print rf69 debug message more detail
Sidong Yang [Sun, 7 Nov 2021 10:59:47 +0000 (10:59 +0000)]
staging: pi433: print rf69 debug message more detail

When pi433 failed for rf69 configuration, Debug message should help for
finding which value is incorrect. But it's hard to know because it just
prints "illegal value". This patch make print message more detail.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Link: https://lore.kernel.org/r/20211107105947.21928-1-realwakka@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove MSG_88E macro
Phillip Potter [Sat, 6 Nov 2021 23:16:36 +0000 (23:16 +0000)]
staging: r8188eu: remove MSG_88E macro

Remove MSG_88E macro from include/rtw_debug.h, as it no longer has any
callers within the driver.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211106231636.894-3-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: convert final two MSG_88E calls to netdev_dbg
Phillip Potter [Sat, 6 Nov 2021 23:16:35 +0000 (23:16 +0000)]
staging: r8188eu: convert final two MSG_88E calls to netdev_dbg

Convert final two MSG_88E calls to use netdev_dbg instead. They seem to
contain useful information so rather than delete them outright, it makes
sense to convert them over to use the kernel's dynamic debugging/logging
facility as other network drivers do.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211106231636.894-2-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vt6655: fix camelcase byData in card.c
Tommaso Merciai [Sat, 6 Nov 2021 18:48:19 +0000 (19:48 +0100)]
staging: vt6655: fix camelcase byData in card.c

Replace camelcase variable "byData" into linux kernel coding style
equivalent variable "data" in card.c.
"by" prefix in hungarian notation stands for byte or unsigned char

References:
https://www.kernel.org/doc/html/latest/process/coding-style.html
https://www.cse.iitk.ac.in/users/dsrkg/cs245/html/Guide.htm

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Link: https://lore.kernel.org/r/20211106184822.24242-1-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: core: remove unused local variable padapter
Saurav Girepunje [Fri, 5 Nov 2021 16:53:30 +0000 (22:23 +0530)]
staging: rtl8723bs: core: remove unused local variable padapter

Remove the unused variable padapter from Efuse_Write1ByteToFakeContent
This variable is not used in the function.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/20211105165330.78524-3-saurav.girepunje@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: core: remove unused variable pAdapter
Saurav Girepunje [Fri, 5 Nov 2021 16:53:29 +0000 (22:23 +0530)]
staging: rtl8723bs: core: remove unused variable pAdapter

Remove the unused variable pAdapter from Efuse_Read1ByteFromFakeContent
This variable is not used in the function.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/20211105165330.78524-2-saurav.girepunje@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: fbtft: Remove fb_watterott driver
Noralf Trønnes [Fri, 5 Nov 2021 20:24:48 +0000 (21:24 +0100)]
staging: fbtft: Remove fb_watterott driver

This driver was made for a prototype and as far as I know it never went
into production because it was too slow. So let's remove it.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://lore.kernel.org/r/20211105202448.62518-1-noralf@tronnes.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove MSG_88E call from odm_TXPowerTrackingThermalMeterInit
Phillip Potter [Fri, 5 Nov 2021 00:28:07 +0000 (00:28 +0000)]
staging: r8188eu: remove MSG_88E call from odm_TXPowerTrackingThermalMeterInit

Remove unnecessary MSG_88E macro call from hal/odm.c, within the
function odm_TXPowerTrackingThermalMeterInit. All it does is print a
struct member, during initialization, that is then immediately set on
the following line. It is therefore surplus to requirements.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20211105002807.6628-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: core: remove the unused variable pAdapter
Saurav Girepunje [Thu, 4 Nov 2021 03:22:42 +0000 (08:52 +0530)]
staging: r8188eu: core: remove the unused variable pAdapter

Remove the unused variable pAdapter from Efuse_Write1ByteToFakeContent
This variable is not used in the function.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYNSAqGgDPhV1IE1@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: core: remove unused variable sz
Saurav Girepunje [Thu, 4 Nov 2021 03:02:58 +0000 (08:32 +0530)]
staging: r8188eu: core: remove unused variable sz

Remove the unused variable sz from function dynamic_chk_wk_hdl.
This variable is not used on function.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYNNDXtkICWpk6qj@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: core: remove the function __nat25_timeout
Saurav Girepunje [Thu, 4 Nov 2021 02:46:35 +0000 (08:16 +0530)]
staging: r8188eu: core: remove the function __nat25_timeout

Remove the function __nat25_timeout from rtw_br_ext.c file. This function
can be replace by single statement jiffies - NAT25_AGEING_TIME*HZ.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYNJPCQ5hX8BTzwy@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: os_dep: remove the goto statement
Saurav Girepunje [Wed, 3 Nov 2021 15:48:41 +0000 (21:18 +0530)]
staging: r8188eu: os_dep: remove the goto statement

Remove the goto statement from rtw_init_drv_sw(). In this function goto
can be replace by return statement. As on goto label exit, function
only return it is not performing any cleanup. Avoiding goto will
improve the function readability.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YYKvWeyqd71pYSqM@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove ODM_Write4Byte
Martin Kaiser [Tue, 2 Nov 2021 08:18:33 +0000 (09:18 +0100)]
staging: r8188eu: remove ODM_Write4Byte

Remove the ODM_Write4Byte wrapper and call rtw_write32 directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211102081833.18054-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove ODM_Write2Byte
Martin Kaiser [Tue, 2 Nov 2021 08:18:32 +0000 (09:18 +0100)]
staging: r8188eu: remove ODM_Write2Byte

Remove the ODM_Write2Byte wrapper and call rtw_write16 directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211102081833.18054-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove ODM_Write1Byte
Martin Kaiser [Tue, 2 Nov 2021 08:18:31 +0000 (09:18 +0100)]
staging: r8188eu: remove ODM_Write1Byte

Remove the ODM_Write1Byte wrapper and call rtw_write8 directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211102081833.18054-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove ODM_Read4Byte
Martin Kaiser [Tue, 2 Nov 2021 08:18:30 +0000 (09:18 +0100)]
staging: r8188eu: remove ODM_Read4Byte

Remove the ODM_Read4Byte wrapper and call rtw_read32 directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211102081833.18054-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: r8188eu: remove ODM_Read1Byte
Martin Kaiser [Tue, 2 Nov 2021 08:18:29 +0000 (09:18 +0100)]
staging: r8188eu: remove ODM_Read1Byte

This is just a wrapper that calls rtw_read8. Remove the wrapper and
call rtw_read8 directly.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211102081833.18054-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agoLinux 5.16-rc1
Linus Torvalds [Sun, 14 Nov 2021 21:56:52 +0000 (13:56 -0800)]
Linux 5.16-rc1

3 years agokconfig: Add support for -Wimplicit-fallthrough
Gustavo A. R. Silva [Sun, 14 Nov 2021 00:57:25 +0000 (18:57 -0600)]
kconfig: Add support for -Wimplicit-fallthrough

Add Kconfig support for -Wimplicit-fallthrough for both GCC and Clang.

The compiler option is under configuration CC_IMPLICIT_FALLTHROUGH,
which is enabled by default.

Special thanks to Nathan Chancellor who fixed the Clang bug[1][2]. This
bugfix only appears in Clang 14.0.0, so older versions still contain
the bug and -Wimplicit-fallthrough won't be enabled for them, for now.

This concludes a long journey and now we are finally getting rid
of the unintentional fallthrough bug-class in the kernel, entirely. :)

Link: https://github.com/llvm/llvm-project/commit/9ed4a94d6451046a51ef393cd62f00710820a7e8
Link: https://bugs.llvm.org/show_bug.cgi?id=51094
Link: https://github.com/KSPP/linux/issues/115
Link: https://github.com/ClangBuiltLinux/linux/issues/236
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3 years agoMerge tag 'xfs-5.16-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sun, 14 Nov 2021 20:18:22 +0000 (12:18 -0800)]
Merge tag 'xfs-5.16-merge-5' of git://git./fs/xfs/xfs-linux

Pull xfs cleanups from Darrick Wong:
 "The most 'exciting' aspect of this branch is that the xfsprogs
  maintainer and I have worked through the last of the code
  discrepancies between kernel and userspace libxfs such that there are
  no code differences between the two except for #includes.

  IOWs, diff suffices to demonstrate that the userspace tools behave the
  same as the kernel, and kernel-only bits are clearly marked in the
  /kernel/ source code instead of just the userspace source.

  Summary:

   - Clean up open-coded swap() calls.

   - A little bit of #ifdef golf to complete the reunification of the
     kernel and userspace libxfs source code"

* tag 'xfs-5.16-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: sync xfs_btree_split macros with userspace libxfs
  xfs: #ifdef out perag code for userspace
  xfs: use swap() to make dabtree code cleaner

3 years agoMerge tag 'for-5.16/parisc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 14 Nov 2021 19:53:59 +0000 (11:53 -0800)]
Merge tag 'for-5.16/parisc-3' of git://git./linux/kernel/git/deller/parisc-linux

Pull more parisc fixes from Helge Deller:
 "Fix a build error in stracktrace.c, fix resolving of addresses to
  function names in backtraces, fix single-stepping in assembly code and
  flush userspace pte's when using set_pte_at()"

* tag 'for-5.16/parisc-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc/entry: fix trace test in syscall exit path
  parisc: Flush kernel data mapping in set_pte_at() when installing pte for user page
  parisc: Fix implicit declaration of function '__kernel_text_address'
  parisc: Fix backtrace to always include init funtion names

3 years agoMerge tag 'sh-for-5.16' of git://git.libc.org/linux-sh
Linus Torvalds [Sun, 14 Nov 2021 19:37:49 +0000 (11:37 -0800)]
Merge tag 'sh-for-5.16' of git://git.libc.org/linux-sh

Pull arch/sh updates from Rich Felker.

* tag 'sh-for-5.16' of git://git.libc.org/linux-sh:
  sh: pgtable-3level: Fix cast to pointer from integer of different size
  sh: fix READ/WRITE redefinition warnings
  sh: define __BIG_ENDIAN for math-emu
  sh: math-emu: drop unused functions
  sh: fix kconfig unmet dependency warning for FRAME_POINTER
  sh: Cleanup about SPARSE_IRQ
  sh: kdump: add some attribute to function
  maple: fix wrong return value of maple_bus_init().
  sh: boot: avoid unneeded rebuilds under arch/sh/boot/compressed/
  sh: boot: add intermediate vmlinux.bin* to targets instead of extra-y
  sh: boards: Fix the cacography in irq.c
  sh: check return code of request_irq
  sh: fix trivial misannotations

3 years agoMerge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 14 Nov 2021 19:30:50 +0000 (11:30 -0800)]
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:

 - Fix early_iounmap

 - Drop cc-option fallbacks for architecture selection

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9156/1: drop cc-option fallbacks for architecture selection
  ARM: 9155/1: fix early early_iounmap()

3 years agoMerge tag 'devicetree-fixes-for-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Nov 2021 19:11:51 +0000 (11:11 -0800)]
Merge tag 'devicetree-fixes-for-5.16-1' of git://git./linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

 - Two fixes due to DT node name changes on Arm, Ltd. boards

 - Treewide rename of Ingenic CGU headers

 - Update ST email addresses

 - Remove Netlogic DT bindings

 - Dropping few more cases of redundant 'maxItems' in schemas

 - Convert toshiba,tc358767 bridge binding to schema

* tag 'devicetree-fixes-for-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: watchdog: sunxi: fix error in schema
  bindings: media: venus: Drop redundant maxItems for power-domain-names
  dt-bindings: Remove Netlogic bindings
  clk: versatile: clk-icst: Ensure clock names are unique
  of: Support using 'mask' in making device bus id
  dt-bindings: treewide: Update @st.com email address to @foss.st.com
  dt-bindings: media: Update maintainers for st,stm32-hwspinlock.yaml
  dt-bindings: media: Update maintainers for st,stm32-cec.yaml
  dt-bindings: mfd: timers: Update maintainers for st,stm32-timers
  dt-bindings: timer: Update maintainers for st,stm32-timer
  dt-bindings: i2c: imx: hardware do not restrict clock-frequency to only 100 and 400 kHz
  dt-bindings: display: bridge: Convert toshiba,tc358767.txt to yaml
  dt-bindings: Rename Ingenic CGU headers to ingenic,*.h

3 years agoMerge tag 'timers-urgent-2021-11-14' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Nov 2021 18:43:38 +0000 (10:43 -0800)]
Merge tag 'timers-urgent-2021-11-14' of git://git./linux/kernel/git/tip/tip

Pull timer fix from Thomas Gleixner:
 "A single fix for POSIX CPU timers to address a problem where POSIX CPU
  timer delivery stops working for a new child task because
  copy_process() copies state information which is only valid for the
  parent task"

* tag 'timers-urgent-2021-11-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  posix-cpu-timers: Clear task::posix_cputimers_work in copy_process()

3 years agoMerge tag 'irq-urgent-2021-11-14' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 14 Nov 2021 18:38:27 +0000 (10:38 -0800)]
Merge tag 'irq-urgent-2021-11-14' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "A set of fixes for the interrupt subsystem

  Core code:

   - A regression fix for the Open Firmware interrupt mapping code where
     a interrupt controller property in a node caused a map property in
     the same node to be ignored.

  Interrupt chip drivers:

   - Workaround a limitation in SiFive PLIC interrupt chip which
     silently ignores an EOI when the interrupt line is masked.

   - Provide the missing mask/unmask implementation for the CSKY MP
     interrupt controller.

  PCI/MSI:

   - Prevent a use after free when PCI/MSI interrupts are released by
     destroying the sysfs entries before freeing the memory which is
     accessed in the sysfs show() function.

   - Implement a mask quirk for the Nvidia ION AHCI chip which does not
     advertise masking capability despite implementing it. Even worse
     the chip comes out of reset with all MSI entries masked, which due
     to the missing masking capability never get unmasked.

   - Move the check which prevents accessing the MSI[X] masking for XEN
     back into the low level accessors. The recent consolidation missed
     that these accessors can be invoked from places which do not have
     that check which broke XEN. Move them back to he original place
     instead of sprinkling tons of these checks all over the code"

* tag 'irq-urgent-2021-11-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  of/irq: Don't ignore interrupt-controller when interrupt-map failed
  irqchip/sifive-plic: Fixup EOI failed when masked
  irqchip/csky-mpintc: Fixup mask/unmask implementation
  PCI/MSI: Destroy sysfs before freeing entries
  PCI: Add MSI masking quirk for Nvidia ION AHCI
  PCI/MSI: Deal with devices lying about their MSI mask capability
  PCI/MSI: Move non-mask check back into low level accessors

3 years agoMerge tag 'locking-urgent-2021-11-14' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Nov 2021 18:30:17 +0000 (10:30 -0800)]
Merge tag 'locking-urgent-2021-11-14' of git://git./linux/kernel/git/tip/tip

Pull x86 static call update from Thomas Gleixner:
 "A single fix for static calls to make the trampoline patching more
  robust by placing explicit signature bytes after the call trampoline
  to prevent patching random other jumps like the CFI jump table
  entries"

* tag 'locking-urgent-2021-11-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  static_call,x86: Robustify trampoline patching

3 years agoMerge tag 'sched_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Nov 2021 17:39:03 +0000 (09:39 -0800)]
Merge tag 'sched_urgent_for_v5.16_rc1' of git://git./linux/kernel/git/tip/tip

Pull scheduler fixes from Borislav Petkov:

 - Avoid touching ~100 config files in order to be able to select the
   preemption model

 - clear cluster CPU masks too, on the CPU unplug path

 - prevent use-after-free in cfs

 - Prevent a race condition when updating CPU cache domains

 - Factor out common shared part of smp_prepare_cpus() into a common
   helper which can be called by both baremetal and Xen, in order to fix
   a booting of Xen PV guests

* tag 'sched_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  preempt: Restore preemption model selection configs
  arch_topology: Fix missing clear cluster_cpumask in remove_cpu_topology()
  sched/fair: Prevent dead task groups from regaining cfs_rq's
  sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
  x86/smp: Factor out parts of native_smp_prepare_cpus()

3 years agoMerge tag 'perf_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Nov 2021 17:33:12 +0000 (09:33 -0800)]
Merge tag 'perf_urgent_for_v5.16_rc1' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Borislav Petkov:

 - Prevent unintentional page sharing by checking whether a page
   reference to a PMU samples page has been acquired properly before
   that

 - Make sure the LBR_SELECT MSR is saved/restored too

 - Reset the LBR_SELECT MSR when resetting the LBR PMU to clear any
   residual data left

* tag 'perf_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/core: Avoid put_page() when GUP fails
  perf/x86/vlbr: Add c->flags to vlbr event constraints
  perf/x86/lbr: Reset LBR_SELECT during vlbr reset

3 years agoMerge tag 'x86_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Nov 2021 17:29:03 +0000 (09:29 -0800)]
Merge tag 'x86_urgent_for_v5.16_rc1' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

 - Add the model number of a new, Raptor Lake CPU, to intel-family.h

 - Do not log spurious corrected MCEs on SKL too, due to an erratum

 - Clarify the path of paravirt ops patches upstream

 - Add an optimization to avoid writing out AMX components to sigframes
   when former are in init state

* tag 'x86_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/cpu: Add Raptor Lake to Intel family
  x86/mce: Add errata workaround for Skylake SKX37
  MAINTAINERS: Add some information to PARAVIRT_OPS entry
  x86/fpu: Optimize out sigframe xfeatures when in init state

3 years agoMerge tag 'perf-tools-for-v5.16-2021-11-13' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sun, 14 Nov 2021 17:25:01 +0000 (09:25 -0800)]
Merge tag 'perf-tools-for-v5.16-2021-11-13' of git://git./linux/kernel/git/acme/linux

Pull more perf tools updates from Arnaldo Carvalho de Melo:
 "Hardware tracing:

   - ARM:
      * Print the size of the buffer size consistently in hexadecimal in
        ARM Coresight.
      * Add Coresight snapshot mode support.
      * Update --switch-events docs in 'perf record'.
      * Support hardware-based PID tracing.
      * Track task context switch for cpu-mode events.

   - Vendor events:
      * Add metric events JSON file for power10 platform

  perf test:

   - Get 'perf test' unit tests closer to kunit.

   - Topology tests improvements.

   - Remove bashisms from some tests.

  perf bench:

   - Fix memory leak of perf_cpu_map__new() in the futex benchmarks.

  libbpf:

   - Add some more weak libbpf functions o allow building with the
     libbpf versions, old ones, present in distros.

  libbeauty:

   - Translate [gs]setsockopt 'level' argument integer values to
     strings.

  tools headers UAPI:

   - Sync futex_waitv, arch prctl, sound, i195_drm and msr-index files
     with the kernel sources.

  Documentation:

   - Add documentation to 'struct symbol'.

   - Synchronize the definition of enum perf_hw_id with code in
     tools/perf/design.txt"

* tag 'perf-tools-for-v5.16-2021-11-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (67 commits)
  perf tests: Remove bash constructs from stat_all_pmu.sh
  perf tests: Remove bash construct from record+zstd_comp_decomp.sh
  perf test: Remove bash construct from stat_bpf_counters.sh test
  perf bench futex: Fix memory leak of perf_cpu_map__new()
  tools arch x86: Sync the msr-index.h copy with the kernel sources
  tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
  tools headers UAPI: Sync sound/asound.h with the kernel sources
  tools headers UAPI: Sync linux/prctl.h with the kernel sources
  tools headers UAPI: Sync arch prctl headers with the kernel sources
  perf tools: Add more weak libbpf functions
  perf bpf: Avoid memory leak from perf_env__insert_btf()
  perf symbols: Factor out annotation init/exit
  perf symbols: Bit pack to save a byte
  perf symbols: Add documentation to 'struct symbol'
  tools headers UAPI: Sync files changed by new futex_waitv syscall
  perf test bpf: Use ARRAY_CHECK() instead of ad-hoc equivalent, addressing array_size.cocci warning
  perf arm-spe: Support hardware-based PID tracing
  perf arm-spe: Save context ID in record
  perf arm-spe: Update --switch-events docs in 'perf record'
  perf arm-spe: Track task context switch for cpu-mode events
  ...