platform/kernel/linux-rpi.git
3 years agostaging: vchiq_core: fix if alignments
Stefan Wahren [Sun, 11 Apr 2021 18:11:39 +0000 (20:11 +0200)]
staging: vchiq_core: fix if alignments

This fixes the alignment of some if statements.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-10-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: introduce SLOT_QUEUE_INDEX_FROM_POS_MASKED
Stefan Wahren [Sun, 11 Apr 2021 18:11:38 +0000 (20:11 +0200)]
staging: vchiq_core: introduce SLOT_QUEUE_INDEX_FROM_POS_MASKED

Define a macro which already masked the result of SLOT_QUEUE_INDEX_FROM_POS.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-9-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: use BITSET_WORD macro
Stefan Wahren [Sun, 11 Apr 2021 18:11:37 +0000 (20:11 +0200)]
staging: vchiq_core: use BITSET_WORD macro

Use this macro to make the index retrieval less opaque.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-8-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: improve readability of request_poll
Stefan Wahren [Sun, 11 Apr 2021 18:11:36 +0000 (20:11 +0200)]
staging: vchiq_core: improve readability of request_poll

Storing the index for poll services in a local var will increase the
readability of the second loop. Also we get the rid off the checkpatch
issue about the line ending with a square bracket.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-7-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: introduce service skip
Stefan Wahren [Sun, 11 Apr 2021 18:11:35 +0000 (20:11 +0200)]
staging: vchiq_core: introduce service skip

In case there is no service pointer provided, we can skip these polling.
Use a goto to reduce the indentation, which is necessary for the following
patches. Btw fix the brace alignment of the loops.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-6-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: Exit early in 2 functions
Stefan Wahren [Sun, 11 Apr 2021 18:11:34 +0000 (20:11 +0200)]
staging: vchiq_core: Exit early in 2 functions

Exit early allow us to reduce the indention in vchiq_open_service_internal()
and vchiq_set_service_option(). Btw we can avoid the multi-line assignments
of quota.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-5-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: Get the rid off curly braces around cases
Stefan Wahren [Sun, 11 Apr 2021 18:11:33 +0000 (20:11 +0200)]
staging: vchiq_core: Get the rid off curly braces around cases

Additional curly braces around cases are a bit harder to read. So
change the scope of service quota to get the rid off those braces.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-4-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: Shorten var name for service quota
Stefan Wahren [Sun, 11 Apr 2021 18:11:32 +0000 (20:11 +0200)]
staging: vchiq_core: Shorten var name for service quota

Readibility and following clean-ups will benefit from the shorter name.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-3-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: Simplify vchiq_send_remote_use*
Stefan Wahren [Sun, 11 Apr 2021 18:11:31 +0000 (20:11 +0200)]
staging: vchiq_core: Simplify vchiq_send_remote_use*

There is no need for variable status. So drop it and improve readability.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-2-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rts5208: remove unnecessary ftrace-like logging
Mitali Borkar [Sun, 11 Apr 2021 17:33:23 +0000 (23:03 +0530)]
staging: rts5208: remove unnecessary ftrace-like logging

Removed unnecessary ftrace-like logging by simply deleting that statement
as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/YHMy457UGosfeaC0@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c
Fabio Aiuto [Sun, 11 Apr 2021 12:57:37 +0000 (14:57 +0200)]
staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c

fix following W=1 compiler issue:

drivers/staging/rtl8723bs/hal/sdio_halinit.c:
In function '_ReadAdapterInfo8723BS':
drivers/staging/rtl8723bs/hal/sdio_halinit.c:1156:16:
warning: variable 'start' set but not used [-Wunused-but-set-variable]
1156 |  unsigned long start;
     |                ^~~~~

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ce1faa15052b519738656e11658dee93f9e91c29.1618145345.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unnecessary goto jumps
Bryan Brattlof [Sun, 11 Apr 2021 13:36:39 +0000 (13:36 +0000)]
staging: rtl8723bs: remove unnecessary goto jumps

The next instruction for both 'goto exit' jump statements is to
execute the exit jump instructions regardless. We can safely
remove all jump statements from __init rtw_drv_entry()

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210411133625.38195-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agoStaging: rtl8192u: ieee80211: remove odd backslash.
Dmitrii Wolf [Sun, 11 Apr 2021 12:03:02 +0000 (15:03 +0300)]
Staging: rtl8192u: ieee80211: remove odd backslash.

This backslash should be deleted - looks like leftover and not needed.

Signed-off-by: Dmitrii Wolf <dev.dragon@bk.ru>
Link: https://lore.kernel.org/r/20210411120301.6549-1-dev.dragon@bk.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: Change controlling expressions
Fabio M. De Francesco [Sun, 11 Apr 2021 11:04:58 +0000 (13:04 +0200)]
staging: rtl8723bs: Change controlling expressions

Change controlling expressions within 'if' statements: don't compare
with 'true'.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-5-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: include: Change the type of a variable
Fabio M. De Francesco [Sun, 11 Apr 2021 11:04:57 +0000 (13:04 +0200)]
staging: rtl8723bs: include: Change the type of a variable

Change the type of fw_current_in_ps_mode from u8 to bool, because
it is used everywhere as a bool and, accordingly, it should be
declared as a bool.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-4-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: include: Fix misspelled words in comments
Fabio M. De Francesco [Sun, 11 Apr 2021 11:04:56 +0000 (13:04 +0200)]
staging: rtl8723bs: include: Fix misspelled words in comments

Correct misspelled words in comments of several files. Issue (largely)
detected by checkpatch.pl.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: Remove camelcase in several files
Fabio M. De Francesco [Sun, 11 Apr 2021 11:04:55 +0000 (13:04 +0200)]
staging: rtl8723bs: Remove camelcase in several files

Remove camelcase in bFwCurrentInPSMode, a variable used by code
of several subdirectories/files of the driver. Issue detected by
checkpatch.pl. Delete the unnecessary "b" (that stands for "byte") from
the beginning of the name.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210411110458.15955-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove more empty if blocks after DBG_8192C deletion
Fabio Aiuto [Sat, 10 Apr 2021 14:20:38 +0000 (16:20 +0200)]
staging: rtl8723bs: remove more empty if blocks after DBG_8192C deletion

remove more empty if-blocks after DBG_8192C deletion.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/99b111d2bac822b9dc7ff6e1cfd3d3efc62ef836.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove more unnecessary parentheses
Fabio Aiuto [Sat, 10 Apr 2021 14:20:37 +0000 (16:20 +0200)]
staging: rtl8723bs: remove more unnecessary parentheses

remove more unnecessary parentheses after
DBG_8192C deletion.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c730d2719cb2ed385dd55811d6e205c6c31f2355.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: fix comparison to true issue
Fabio Aiuto [Sat, 10 Apr 2021 14:20:36 +0000 (16:20 +0200)]
staging: rtl8723bs: fix comparison to true issue

fix following post-commit hook checkpatch issue:

CHECK: Using comparison to true is error prone
136: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:
2497:
+ if (psta->dot8021xalg != 1 ||
psta->bpairwise_key_installed == true) {

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/680d86950d760003a694f8880c0a912a9d815a5e.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove empty else block in os_dep/ioctl_cfg80211.c
Fabio Aiuto [Sat, 10 Apr 2021 14:20:35 +0000 (16:20 +0200)]
staging: rtl8723bs: remove empty else block in os_dep/ioctl_cfg80211.c

remove empty else-block

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1bee993834410c2c11a6799e1868589efc1334f6.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unnecessary parentheses in os_dep/ioctl_cfg80211.c
Fabio Aiuto [Sat, 10 Apr 2021 14:20:34 +0000 (16:20 +0200)]
staging: rtl8723bs: remove unnecessary parentheses in os_dep/ioctl_cfg80211.c

fix following post-commit hook checkpatch issue:

WARNING: braces {} are not necessary for single statement blocks
94: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1225:
+ if (pwdev_priv->scan_request->wiphy == pwdev_priv->rtw_wdev->wiphy)
  {
  cfg80211_scan_done(pwdev_priv->scan_request, &info);
  }

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fabc590b9f74f687cc0f7ea978577f0357df2974.1618064275.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: put constant on the right side of a test in os_dep/ioctl_cfg80211.c
Fabio Aiuto [Sat, 10 Apr 2021 14:20:33 +0000 (16:20 +0200)]
staging: rtl8723bs: put constant on the right side of a test in os_dep/ioctl_cfg80211.c

fix following post-commit hook checkpatch issue:

CHECK: Comparison to NULL could be written "psta"
72: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854:
+ if (psta != NULL) {

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/5ac547f3a4bd228f372da7057bbfb3cac1535857.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove empty if and else blocks
Fabio Aiuto [Sat, 10 Apr 2021 14:20:32 +0000 (16:20 +0200)]
staging: rtl8723bs: remove empty if and else blocks

remove if and else blocks after DBG_8192C removal

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2d2e09d5033bda1ceb77576e582ecf1dcfccf428.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: put constant on the right side of the test
Fabio Aiuto [Sat, 10 Apr 2021 14:20:31 +0000 (16:20 +0200)]
staging: rtl8723bs: put constant on the right side of the test

fix following post-commit hook checpatch issues:

WARNING: Comparisons should place the constant on the right side of the test
287: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:738:
+ if (_SUCCESS != ret)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e19cff736413714dea4265c17b512882d051a311.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: split long line
Fabio Aiuto [Sat, 10 Apr 2021 14:20:30 +0000 (16:20 +0200)]
staging: rtl8723bs: split long line

fix following post-commit hook checkpatch issue:

WARNING: line length of 103 exceeds 100 columns
168: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1086:
+ if (efuse_OneByteRead(padapter, efuse_addr, &efuse_data, bPseudoTest) == false)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/28c078c685059c9b883b563f2c08cfb1d49cb82c.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: put spaces around operators
Fabio Aiuto [Sat, 10 Apr 2021 14:20:29 +0000 (16:20 +0200)]
staging: rtl8723bs: put spaces around operators

fix following post-commit hook checkpatch issues:

CHECK: spaces preferred around that '+' (ctx:VxV)
87: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:746:
+ if ((_offset+_size_byte) > EFUSE_MAX_MAP_LEN)
--
CHECK: spaces preferred around that '+' (ctx:VxV)
105: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:847:
+ if ((_offset+_size_byte) > EFUSE_BT_MAP_LEN)
--
CHECK: spaces preferred around that '-' (ctx:VxV)
133: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:906:
+ if ((eFuse_Addr-1) < total)
--
CHECK: spaces preferred around that '|' (ctx:VxV)
392: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2485:
+ if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != true)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/65b7cf4b1ae3cea25a316f3c9f56c697ee7be8af.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: fix comparison to null
Fabio Aiuto [Sat, 10 Apr 2021 14:20:28 +0000 (16:20 +0200)]
staging: rtl8723bs: fix comparison to null

fix following post-commit hook checkpatch issues:

CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_req_ie"
348: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1319:
+ if (pmlmepriv->wps_probe_req_ie == NULL)

CHECK: Comparison to NULL could be written "!dvobj"
459: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:184:
+ if (dvobj == NULL)

CHECK: Comparison to NULL could be written "!padapter"
470: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:231:
+ if (padapter == NULL)

CHECK: Comparison to NULL could be written "!padapter"
481: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:240:
+ if (padapter == NULL)

CHECK: Comparison to NULL could be written "!padapter"
492: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:256:
+ if (padapter == NULL)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2c7557a465aeda7fb6989df30c6250f9ec56ebe1.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unnecessary bracks
Fabio Aiuto [Sat, 10 Apr 2021 14:20:27 +0000 (16:20 +0200)]
staging: rtl8723bs: remove unnecessary bracks

remove unnecessary bracks in if-else blocks

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/812e5e0dcb78e49568276237b68dc6f9632c198d.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol definition
Fabio Aiuto [Sat, 10 Apr 2021 14:20:26 +0000 (16:20 +0200)]
staging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol definition

remove commented out DEBUG_CFG80211 symbol definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b884ecb5c83c222f0b48839f89e53c45f4489e06.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition
Fabio Aiuto [Sat, 10 Apr 2021 14:20:25 +0000 (16:20 +0200)]
staging: rtl8723bs: remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition

remove empty ifdef blocks conditioned to DEBUG_CFG80211
definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7c4485a9d02e8c553c1d81f8b98c8479f481e54c.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol definition
Fabio Aiuto [Sat, 10 Apr 2021 14:20:24 +0000 (16:20 +0200)]
staging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol definition

remove commented out SDIO_DEBUG_IO symbol definition.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/7a45b1419bcf4eb2abc25d661acae77018432e46.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove code block guarded by undefined SDIO_DEBUG_IO
Fabio Aiuto [Sat, 10 Apr 2021 14:20:23 +0000 (16:20 +0200)]
staging: rtl8723bs: remove code block guarded by undefined SDIO_DEBUG_IO

remove code block guarded by SDIO_DEBUG_IO symbol.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/ee77c4b4e6fbba8e0182e9558f793c88cf398cb5.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove empty code block guarded by DBG_CCX
Fabio Aiuto [Sat, 10 Apr 2021 14:20:22 +0000 (16:20 +0200)]
staging: rtl8723bs: remove empty code block guarded by DBG_CCX

remove code block guarded by DBG_CCX symbol, left empty
after DBG_8192C removal.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b9ff4d7f14decf33064c30b307c3b20494aecbb2.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove code blocks guarded by DEBUG symbol
Fabio Aiuto [Sat, 10 Apr 2021 14:20:21 +0000 (16:20 +0200)]
staging: rtl8723bs: remove code blocks guarded by DEBUG symbol

remove code blocks guarded by DEBUG symbol
remove undefinition of DEBUG

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/381da3f0c1ddf825b2aa7cbfd074ee2bf42aac4f.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove commented out DEBUG_RTL871X definition
Fabio Aiuto [Sat, 10 Apr 2021 14:20:20 +0000 (16:20 +0200)]
staging: rtl8723bs: remove commented out DEBUG_RTL871X definition

remove commented out DEBUG_RTL871X definition

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9d04ab2b645e242e35d31abbb1a301e2ad8c4401.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871X
Fabio Aiuto [Sat, 10 Apr 2021 14:20:19 +0000 (16:20 +0200)]
staging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871X

remove unused code blocks guarded by never set DEBUG_RTL871X

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/c7b590b7ae7fad08cd913462ab385db9230ede4d.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: put spaces around operators
Fabio Aiuto [Sat, 10 Apr 2021 14:20:18 +0000 (16:20 +0200)]
staging: rtl8723bs: put spaces around operators

fix following post-commit hook checkpatch issue:

CHECK: spaces preferred around that '+' (ctx:VxV)
89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431:
+ rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, ;
                     ^
len-_FIXED_IE_LENGTH_, NULL, &wps_ielen)

CHECK: spaces preferred around that '-' (ctx:VxV)
89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431:
+ rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_,
                                          ^
NULL, &wps_ielen);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/35c6c5efa2661c6fd9d40c3a681eb8470c5015e6.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove all if-blocks left empty by DBG_8192C-remove coccinelle...
Fabio Aiuto [Sat, 10 Apr 2021 14:20:17 +0000 (16:20 +0200)]
staging: rtl8723bs: remove all if-blocks left empty by DBG_8192C-remove coccinelle script

remove all empty if blocks left empty by coccinelle
script for DBG_8192C macro removal.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1676083964fe176e996c2c05dfdcb723b49febb6.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove DBG_8192C macro definitions
Fabio Aiuto [Sat, 10 Apr 2021 14:20:16 +0000 (16:20 +0200)]
staging: rtl8723bs: remove DBG_8192C macro definitions

remove all DBG_8192C macro definitions.

Macro DBG_8192C belongs to a family of verbose
private tracing macros.

The default behaviour is _do nothing_, to activate
it one should define DEBUG symbol by hand.

So just remove it

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e7259eeb5927d48a2920548b92dc507befa5e6af.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove all commented out DBG_8192C logs
Fabio Aiuto [Sat, 10 Apr 2021 14:20:15 +0000 (16:20 +0200)]
staging: rtl8723bs: remove all commented out DBG_8192C logs

remove all commented out DBG_8192C logs.

Macro DBG_8192C belongs to a family of verbose
private tracing macros.

The default behaviour is _do nothing_, to activate
it one should define DEBUG symbol by hand.

So just remove it

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/d954fbde0ae689cd053a57f57f954f14b5d013cb.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove all DBG_8192C logs
Fabio Aiuto [Sat, 10 Apr 2021 14:20:14 +0000 (16:20 +0200)]
staging: rtl8723bs: remove all DBG_8192C logs

remove all DBG_8192C logs.

Macro DBG_8192C belongs to a family of verbose
private tracing macros.

The default behaviour is _do nothing_, to activate
it one should define DEBUG symbol by hand.

So just remove it with the following semantic patch:

@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@

(
- DBG_8192C(a);
|
- DBG_8192C(a, b);
|
- DBG_8192C(a, B);
|
- DBG_8192C(a, b, c);
|
- DBG_8192C(a, B, c);
|
- DBG_8192C(a, b, C);
|
- DBG_8192C(a, B, C);
|
- DBG_8192C(a, b, c, d);
|
- DBG_8192C(a, B, c, d);
|
- DBG_8192C(a, b, C, d);
|
- DBG_8192C(a, b, c, D);
|
- DBG_8192C(a, B, C, d);
|
- DBG_8192C(a, B, c, D);
|
- DBG_8192C(a, b, C, D);
|
- DBG_8192C(a, B, C, D);
|
- DBG_8192C(a, b, c, d, e);
|
- DBG_8192C(a, B, c, d, e);
|
- DBG_8192C(a, b, C, d, e);
|
- DBG_8192C(a, b, c, D, e);
|
- DBG_8192C(a, b, c, d, E);
|
- DBG_8192C(a, B, C, d, e);
|
- DBG_8192C(a, B, c, D, e);
|
- DBG_8192C(a, B, c, d, E);
|
- DBG_8192C(a, b, C, D, e);
|
- DBG_8192C(a, b, C, d, E);
|
- DBG_8192C(a, b, c, D, E);
|
- DBG_8192C(a, B, C, D, e);
|
- DBG_8192C(a, B, C, d, E);
|
- DBG_8192C(a, B, c, D, E);
|
- DBG_8192C(a, b, C, D, E);
|
- DBG_8192C(a, B, C, D, E);
|
- DBG_8192C(a, b, c, d, e, f);
|
- DBG_8192C(a, b, c, d, e, f, g);
|
- DBG_8192C(a, b, c, d, e, f, g, h);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i, j);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i, j, k);
)

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9b338b3781e40c04104f26832add075e7f72d890.1618064274.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: mt7621-pci: stop using of_pci_range_to_resource
Ilya Lipnitskiy [Sat, 10 Apr 2021 17:33:31 +0000 (10:33 -0700)]
staging: mt7621-pci: stop using of_pci_range_to_resource

The logic here was already overriding the erroneous IO addresses
returned from of_pci_range_to_resource, which is the bulk of the logic.

So stop using it altogether and initialize the fields explicitly, as
done in aeba3731b150 ("powerpc/pci: Fix IO space breakage after
of_pci_range_to_resource() change").

Cc: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Link: https://lore.kernel.org/r/20210410173331.57949-1-ilya.lipnitskiy@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: core: Remove an unused variable
Fabio M. De Francesco [Sat, 10 Apr 2021 15:00:06 +0000 (17:00 +0200)]
staging: rtl8723bs: core: Remove an unused variable

Delete local variable "u8 sec_idx" because is declared and set, but never
used.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210410150008.5460-4-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: Fix incorrect pointer check
Mitali Borkar [Sat, 10 Apr 2021 14:56:40 +0000 (20:26 +0530)]
staging: rtl8192e: Fix incorrect pointer check

In commit 92172da23c56 ("staging: rtl8192e: replace comparison to NULL
by bool") a check was changed from looking at the data to the pointer,
which was incorrect, so revert that portion of the commit to have the
proper logic restored.

Reported-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Fixes: 92172da23c56 ("staging: rtl8192e: replace comparison to NULL by bool")
Link: https://lore.kernel.org/r/YHG8qARLUX2KPWwI@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: tests: ni_routes_test: Remove unused variable 'olddevroutes'
Qiheng Lin [Sat, 10 Apr 2021 06:49:32 +0000 (14:49 +0800)]
staging: comedi: tests: ni_routes_test: Remove unused variable 'olddevroutes'

GCC reports the following warning with W=1:

drivers/staging/comedi/drivers/tests/ni_routes_test.c:215:45: warning:
 variable 'olddevroutes' set but not used [-Wunused-but-set-variable]
  215 |  const struct ni_device_routes *devroutes, *olddevroutes;
      |                                             ^~~~~~~~~~~~

This variable is not used in function , this commit
remove it to fix the warning.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
Link: https://lore.kernel.org/r/20210410064932.12905-1-linqiheng@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: ralink-gdma: Add missing MODULE_DEVICE_TABLE
Bixuan Cui [Sat, 10 Apr 2021 03:50:37 +0000 (11:50 +0800)]
staging: ralink-gdma: Add missing MODULE_DEVICE_TABLE

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Link: https://lore.kernel.org/r/20210410035037.11322-1-cuibixuan@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: remove unnecesasry f-trace like logging
Mitali Borkar [Sat, 10 Apr 2021 00:12:10 +0000 (05:42 +0530)]
staging: rtl8192e: remove unnecesasry f-trace like logging

Fixed Check: Remove unnecessary f-trace like logging by simply deleting
that statement as we have other modes of logging like ftrace.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/YHDtWizzh5EVLL4/@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: replace comparison to NULL by bool
Mitali Borkar [Fri, 9 Apr 2021 23:46:34 +0000 (05:16 +0530)]
staging: rtl8192e: replace comparison to NULL by bool

Fixed Comparison to NULL can be written as '!...' by replacing it with
simpler form i.e boolean expression. This makes code more readable alternative.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/YHDnWpWztxeZospi@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove redundant initialization
Bryan Brattlof [Fri, 9 Apr 2021 20:13:08 +0000 (20:13 +0000)]
staging: rtl8723bs: remove redundant initialization

The variable ret is being initialized as 0 and is never used until
it's updated by sdio_register_driver()

This removes the redundant initialization of ret

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210409201235.407671-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove MSG_8192C macro definitions
Fabio Aiuto [Fri, 9 Apr 2021 12:40:03 +0000 (14:40 +0200)]
staging: rtl8723bs: remove MSG_8192C macro definitions

remove obsolete MSG_8192C macro definitions.

MSG_8192C is a private trace mechanism macro and is deactivated.
(i.e. the default behaviour is _do nothing_)
The only way to activate it is to manually define a debug
symbol.

So just remove it.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/97f38f269e8dabb3dd7464d49022a62cd9773657.1617971593.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove commented out MSG_8192C log
Fabio Aiuto [Fri, 9 Apr 2021 12:40:02 +0000 (14:40 +0200)]
staging: rtl8723bs: remove commented out MSG_8192C log

remove commented out MSG_8192C log.

MSG_8192C is a private trace mechanism macro and is deactivated.
(i.e. the default behaviour is _do nothing_)
The only way to activate it is to manually define a debug
symbol.

So just remove it.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/845969563d7c90d1b7aa3215ae29dd91afc5100c.1617971592.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove all MSG_8192C logs
Fabio Aiuto [Fri, 9 Apr 2021 12:40:01 +0000 (14:40 +0200)]
staging: rtl8723bs: remove all MSG_8192C logs

remove all MSG_8192C logs.

MSG_8192C is a private trace mechanism macro and is deactivated.
(i.e. the default behaviour is _do nothing_)
The only way to activate it is to manually define a debug
symbol.

So just remove it.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fa7f52aa90928dc86b3249ca9c5b27f92c2b071b.1617971592.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove decl of unused static const variable in os_dep/ioctl_linux.c
Fabio Aiuto [Fri, 9 Apr 2021 10:01:39 +0000 (12:01 +0200)]
staging: rtl8723bs: remove decl of unused static const variable in os_dep/ioctl_linux.c

fix following kernel test robot warning:

   At top level:
   drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27:
warning: 'iw_operation_mode' defined but not used
[-Wunused-const-variable=]
      36 | static const char * const iw_operation_mode[] = {
         |                           ^~~~~~~~~~~~~~~~~

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/05cc97a114269ee55ac9a91c61493c885fcc0193.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variable in os_dep/ioctl_linux.c
Fabio Aiuto [Fri, 9 Apr 2021 10:01:38 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused variable in os_dep/ioctl_linux.c

fix following kernel test robot warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function â€˜rtw_wx_set_mlme’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6:
warning: variable â€˜reason’ set but
not used [-Wunused-but-set-variable]
  u16 reason;
      ^~~~~~

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/6211c4177a9ef1e677987c9ebac445df08605f40.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variable declaration in include/rtw_security.h
Fabio Aiuto [Fri, 9 Apr 2021 10:01:37 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused variable declaration in include/rtw_security.h

fix following kernel test robot warning:

   At top level:
   drivers/staging/rtl8723bs/include/rtw_security.h:336:28:
warning: 'K' defined but not used [-Wunused-const-variable=]
     336 | static const unsigned long K[64] = {
         |                            ^

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/819680ab87bbe543aba966f1fe47b209d3d8a69f.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused pmlmepriv variable in rtw_dbg_port() in os_dep...
Fabio Aiuto [Fri, 9 Apr 2021 10:01:36 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused pmlmepriv variable in rtw_dbg_port() in os_dep/ioctl_linux.c

remove unused variable. Fix W=1 compiler warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function â€˜rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2444:20:
warning: unused variable â€˜pmlmepriv’ [-Wunused-variable]
  struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/e8a31937b0075162104347e1c8ecc5e6d079f6d2.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused cur_network variable in rtw_dbg_port() in os_dep...
Fabio Aiuto [Fri, 9 Apr 2021 10:01:35 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused cur_network variable in rtw_dbg_port() in os_dep/ioctl_linux.c

remove unused variable. Fix W=1 compiler warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function â€˜rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2447:23:
warning: unused variable â€˜cur_network’ [-Wunused-variable]
  struct wlan_network *cur_network = &(pmlmepriv->cur_network);

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/6aed13408f912b6c36a19a5e91e17b1126fc6247.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variable pstapriv in rtw_dbg_port() in os_dep/ioctl...
Fabio Aiuto [Fri, 9 Apr 2021 10:01:34 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused variable pstapriv in rtw_dbg_port() in os_dep/ioctl_linux.c

remove unused variable. W=1 compiler issue:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function â€˜rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2448:19:
warning: unused variable â€˜pstapriv’ [-Wunused-variable]
  struct sta_priv *pstapriv = &padapter->stapriv;

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/d433ffa5b52d6510811c882a80c1146c7d7be536.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove set but unused psta variable in rtw_dbg_port() in os_dep...
Fabio Aiuto [Fri, 9 Apr 2021 10:01:33 +0000 (12:01 +0200)]
staging: rtl8723bs: remove set but unused psta variable in rtw_dbg_port() in os_dep/ioctl_linux.c

remove set but unused variable. Fix W=1 compiler warning:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function â€˜rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2443:19:
warning: variable â€˜psta’ set but not used [-Wunused-but-set-variable]
  struct sta_info *psta;
                   ^~~~

Remove also the function call that sets this variable.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/62b6c48b887decdde4b5343472089665518d205b.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variables and code block left unused in os_dep...
Fabio Aiuto [Fri, 9 Apr 2021 10:01:32 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused variables and code block left unused in os_dep/ioctl_linux.c

fix following kernel test robot warnings:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:
In function â€˜rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33:
warning: variable â€˜preorder_ctrl’ set but
not used [-Wunused-but-set-variable]
       struct recv_reorder_ctrl *preorder_ctrl;
                                 ^~~~~~~~~~~~~

remove also unnecessary conditional code block.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/0e950e74565b573a98b851092cc2078045d5ac3d.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused code block in os_dep/ioctl_linux.c
Fabio Aiuto [Fri, 9 Apr 2021 10:01:31 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused code block in os_dep/ioctl_linux.c

remove unused code block which does nothing.

A list is parsed but no value is written outside
the scope of the function rtw_dbg_port.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/b1d8f99f949fd79b27295e8a508d1b0c5861622f.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variable and empty for cycles left unused in os_dep...
Fabio Aiuto [Fri, 9 Apr 2021 10:01:30 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused variable and empty for cycles left unused in os_dep/ioctl_linux.c

fix following kernel test robot warnings:

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33:
warning: variable â€˜preorder_ctrl’ set but
not used [-Wunused-but-set-variable]
       struct recv_reorder_ctrl *preorder_ctrl;
                                 ^~~~~~~~~~~~~
remove also empty for cycle left unused and counter variable.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/fb1e8ea3cfeda1af27ab1a9393140e144b5cb4b5.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variable in core/rtw_cmd.c
Fabio Aiuto [Fri, 9 Apr 2021 10:01:29 +0000 (12:01 +0200)]
staging: rtl8723bs: remove unused variable in core/rtw_cmd.c

fix following kernel test robot warning:

   drivers/staging/rtl8723bs/core/rtw_cmd.c:
In function 'rtw_cmd_thread':
>> drivers/staging/rtl8723bs/core/rtw_cmd.c:390:16:
warning: variable 'cmd_start_time' set
but not used [-Wunused-but-set-variable]
     390 |  unsigned long cmd_start_time;
         |                ^~~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/509eeb1c4a7fcfc37b69cb8578ea146b95b50864.1617962215.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: simplify rtw_cmd_thread's main loop
Martin Kaiser [Thu, 8 Apr 2021 19:56:01 +0000 (21:56 +0200)]
staging: rtl8188eu: simplify rtw_cmd_thread's main loop

In rtw_cmd_thread's main loop, we wait until there's a command in the
queue. To skip this wait statement in subsequent iterations, the driver
uses a label and goto instead of the actual loop. We only get back to the
initial wait if the queue is empty when we read it.

Basically, all we want to do is check if there's a command in the queue.
If yes, we process it. If not, we wait until someone enqueues a command.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: remove a dead assignment
Martin Kaiser [Thu, 8 Apr 2021 19:56:00 +0000 (21:56 +0200)]
staging: rtl8188eu: remove a dead assignment

There's no need to set cmd_hdl to NULL after it's used. It will be set
again before the next command is processed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: remove duplicate if statement
Martin Kaiser [Thu, 8 Apr 2021 19:55:59 +0000 (21:55 +0200)]
staging: rtl8188eu: remove duplicate if statement

There's two identical checks if the device was stopped or unplugged.
Remove one of them.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: always free cmd_obj in the cmd thread
Martin Kaiser [Thu, 8 Apr 2021 19:55:58 +0000 (21:55 +0200)]
staging: rtl8188eu: always free cmd_obj in the cmd thread

The rtl8188 driver starts a command thread that reads commands from a queue
and processes them. Each command consists of a struct cmd_obj. The command
thread may call a function to process the current command and optionally a
post-processing function. Eventually, the command's cmd_obj must be freed.

At the moment, if there's a post-processing function for the current
command, this function has to free the cmd_obj. If there's no
post-processing function, the command thread frees cmd_obj.

It's much simpler if we always leave it to the command thread to free
cmd_obj.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: move another static array from .h to .c
Martin Kaiser [Thu, 8 Apr 2021 19:55:57 +0000 (21:55 +0200)]
staging: rtl8188eu: move another static array from .h to .c

Move the declaration of the rtw_cmd_callback array from rtw_cmd.h to
rtw_cmd.c.

The _RTW_CMD_C_ symbol is now obsolete and can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: move static array from .h to .c
Martin Kaiser [Thu, 8 Apr 2021 19:55:56 +0000 (21:55 +0200)]
staging: rtl8188eu: move static array from .h to .c

Declaring a static array in a header file is likely to cause name conflicts
if the declaration is pulled in multiple times.

The rtl8188 driver protects the declaration of the wlancmds array in
rtw_mlme_ext.h with ifdef _RTW_CMD_C_, which is defined only in rtw_cmd.c.
It makes more sense to declare the array in the .c file.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: remove a constant variable
Martin Kaiser [Thu, 8 Apr 2021 19:55:55 +0000 (21:55 +0200)]
staging: rtl8188eu: remove a constant variable

enqueue is always 0.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: remove unused function parameter
Martin Kaiser [Thu, 8 Apr 2021 19:55:54 +0000 (21:55 +0200)]
staging: rtl8188eu: remove unused function parameter

The struct adapter parameter of rtw_os_recvbuf_resource_alloc is not used.
Remove it.

While at it, use the same parameter name in the prototype and the function
definition.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: replace switch-case with if
Martin Kaiser [Thu, 8 Apr 2021 19:55:53 +0000 (21:55 +0200)]
staging: rtl8188eu: replace switch-case with if

This switch has only one case. Replace it with an if statement.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: make ffaddr2pipehdl static
Martin Kaiser [Thu, 8 Apr 2021 19:55:52 +0000 (21:55 +0200)]
staging: rtl8188eu: make ffaddr2pipehdl static

This function is used only inside usb_ops_linux.c.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: remove prototype for non-existing function
Martin Kaiser [Thu, 8 Apr 2021 19:55:51 +0000 (21:55 +0200)]
staging: rtl8188eu: remove prototype for non-existing function

There's no usb_read_port_cancel function in this driver. Remove its
prototype.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: remove the last urb callback macros
Martin Kaiser [Thu, 8 Apr 2021 19:55:50 +0000 (21:55 +0200)]
staging: rtl8188eu: remove the last urb callback macros

Both usb_read_port_complete and usb_write_port_complete have a regs
parameter that is not used.

When this parameter is removed, the functions can be used as urb
completion callbacks directly. There's no need for the macros that
strip the second parameter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: cb_pcidas64: remove useless function
Jiapeng Chong [Fri, 9 Apr 2021 06:23:45 +0000 (14:23 +0800)]
staging: comedi: cb_pcidas64: remove useless function

Fix the following gcc warning:

drivers/staging/comedi/drivers/cb_pcidas64.c:232:19: warning: unused
function 'analog_trig_low_threshold_bits' [-Wunused-function].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1617949425-105420-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8712: fix wrong function output
Sergei Krainov [Fri, 9 Apr 2021 12:46:11 +0000 (14:46 +0200)]
staging: rtl8712: fix wrong function output

Return NULL from r8712_find_network() if no matched wlan_network
was found. Code with a bug:

while (plist != phead) {
pnetwork = container_of(plist, struct wlan_network, list);
plist = plist->next;
if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN))
break;
}
spin_unlock_irqrestore(&scanned_queue->lock, irqL);
return pnetwork;

In this code last processed pnetwork returned if list end was reached
and no pnetwork matched test condition.

Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com>
Link: https://lore.kernel.org/r/20210409124611.GA3981@test-VirtualBox
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused variable pwrctl
Pu Lehui [Fri, 9 Apr 2021 04:57:28 +0000 (12:57 +0800)]
staging: rtl8723bs: remove unused variable pwrctl

GCC reports the following warning with W=1:

drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:532:23: warning:
 variable 'pwrctl' set but not used [-Wunused-but-set-variable]
   532 |  struct pwrctrl_priv *pwrctl;
       |                       ^~~~~~

This variable is not used so remove it to fix the warning.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20210409045728.125852-1-pulehui@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: Remove unnecessary code
Muhammad Usama Anjum [Thu, 8 Apr 2021 20:44:57 +0000 (01:44 +0500)]
staging: rtl8723bs: Remove unnecessary code

The same code is executed when the condition "!show_errors" is true or
false. Remove the if condition from here. The original intension of this
condition was to not to report any error logs if condition was true. But
this driver doesn't has those logs added. So this if condition can be
removed.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Addresses-Coverity: ("Same code execution")
Link: https://lore.kernel.org/r/20210408204457.GA3079308@LEGION
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8712: remove (most of) enum WIFI_FRAME_TYPE
Christophe JAILLET [Thu, 8 Apr 2021 19:58:53 +0000 (21:58 +0200)]
staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPE

The values defined in enum WIFI_FRAME_TYPE are the same the #define
IEEE80211_FTYPE_xxx from <linux/ieee80211.h>

Use these values to avoid code duplication.

WIFI_QOS_DATA_TYPE is a bit more tricky and doesn't have a direct
equivalence in <linux/ieee80211.h>. So leave this one as-is for now.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e009a4ee6429a3f79742f9a912e3f6a650fb33ed.1617911201.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8712: remove enum WIFI_FRAME_SUBTYPE
Christophe JAILLET [Thu, 8 Apr 2021 19:58:40 +0000 (21:58 +0200)]
staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE

The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define
IEEE80211_STYPE_xxx from <linux/ieee80211.h>

Use theses values to avoid code duplication.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5a6fdcf0b5eb43c3d5511b5badd60bfac9389628.1617911201.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8712: remove struct rtl_ieee80211_ht_cap and ieee80211_ht_addt_info
Christophe JAILLET [Thu, 8 Apr 2021 19:58:27 +0000 (21:58 +0200)]
staging: rtl8712: remove struct rtl_ieee80211_ht_cap and ieee80211_ht_addt_info

struct 'ieee80211_ht_addt_info' is unused and can be removed.

struct 'rtl_ieee80211_ht_cap' can be replaced by 'ieee80211_ht_cap'
defined in <linux/ieee80211.h> which has the same layout.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/4291cb10744457cc12c89fc9fd414c37d732bc9d.1617911201.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused including <linux/version.h>
Tian Tao [Thu, 8 Apr 2021 08:17:25 +0000 (16:17 +0800)]
staging: rtl8723bs: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
Link: https://lore.kernel.org/r/1617869845-43046-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8712: add spaces around '+'
Mitali Borkar [Thu, 8 Apr 2021 11:51:09 +0000 (17:21 +0530)]
staging: rtl8712: add spaces around '+'

Added spaces around '+' to improve readability and adhere to linux
kernel coding style.
Reported by checkpatch

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/YG7uLQLGmAh97xB1@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: Kconfig: Fix COMEDI_TESTS_NI_ROUTES selections
Ian Abbott [Fri, 9 Apr 2021 11:08:44 +0000 (12:08 +0100)]
staging: comedi: Kconfig: Fix COMEDI_TESTS_NI_ROUTES selections

The COMEDI_TESTS_NI_ROUTES option currently selects NI_ROUTING, which
doesn't exist.  It should be selecting COMEDI_NI_ROUTING.  Fix it.

Selecting COMEDI_TESTS_NI_ROUTES without COMEDI_NI_ROUTING resulted in
the following build errors:

ERROR: modpost: "ni_lookup_route_register"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_is_cmd_dest"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_find_route_source"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_get_valid_routes"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_count_valid_routes"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_sort_device_routes"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_assign_device_routes"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_find_route_set"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_route_set_has_source"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!
ERROR: modpost: "ni_route_to_register"
[drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined!

Reported-by: kernel test robot <lkp@intel.com>
Fixes: c82b130616e3 ("staging: comedi: Add Kconfig options to build unit test modules")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210409110844.148378-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove extra indent
Bryan Brattlof [Wed, 7 Apr 2021 20:19:37 +0000 (20:19 +0000)]
staging: rtl8723bs: remove extra indent

There is an extra tab in the conditional statement. This removes it.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210407201842.80074-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8712: removed extra blank line
Mitali Borkar [Thu, 8 Apr 2021 02:25:41 +0000 (07:55 +0530)]
staging: rtl8712: removed extra blank line

Removed an extra blank line so that only one blank line is present in
between two functions which separates them out.
Reported by checkpatch

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/YG5ppTlGhRp5WVgS@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8712: matched alignment with open parenthesis
Mitali Borkar [Thu, 8 Apr 2021 02:58:31 +0000 (08:28 +0530)]
staging: rtl8712: matched alignment with open parenthesis

Aligned arguments with open parenthesis to meet linux kernel coding
style
Reported by checkpatch

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/YG5xV5q7ODTUTVK/@kali
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: hal: Remove camelcase in sdio_ops.c
Fabio M. De Francesco [Thu, 8 Apr 2021 07:05:53 +0000 (09:05 +0200)]
staging: rtl8723bs: hal: Remove camelcase in sdio_ops.c

Remove camelcase. Issue detected by checkpatch.pl. For now, change only
names of static functions in order to not break the driver's code.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210408070553.30363-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: Add Kconfig options to build unit test modules
Ian Abbott [Wed, 7 Apr 2021 18:13:42 +0000 (19:13 +0100)]
staging: comedi: Add Kconfig options to build unit test modules

The comedi unit-test modules in "drivers/staging/comedi/drivers/tests/"
are built if the `CONFIG_COMEDI_TESTS` option is enabled, but the comedi
Kconfig file contains no code to enable the option.  Add config options
to allow each of the unit-test modules to be enabled individually.  The
"ni_route_tests" module depends on the "ni_routing" module, so select it
if the "ni_route_tests" module is configured to be built.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-7-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: tests: example_test: Rename to 'comedi_example_test'
Ian Abbott [Wed, 7 Apr 2021 18:13:41 +0000 (19:13 +0100)]
staging: comedi: tests: example_test: Rename to 'comedi_example_test'

Rename the "example_test" module to "comedi_example_test" to make the
name more relevant to Comedi.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-6-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: tests: example_test: Declare functions static
Ian Abbott [Wed, 7 Apr 2021 18:13:40 +0000 (19:13 +0100)]
staging: comedi: tests: example_test: Declare functions static

The "example_test" module contains a couple of functions with external
linkage that are not called externally.  Declare them `static`.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-5-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: tests: example_test: Reduce stack usage
Ian Abbott [Wed, 7 Apr 2021 18:13:39 +0000 (19:13 +0100)]
staging: comedi: tests: example_test: Reduce stack usage

Declare the `unit_tests` array in `unittest_enter()` `static` to reduce
stack usage a bit.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-4-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: tests: ni_route_tests: Declare functions static
Ian Abbott [Wed, 7 Apr 2021 18:13:38 +0000 (19:13 +0100)]
staging: comedi: tests: ni_route_tests: Declare functions static

The "ni_routes_test" module contains a bunch of functions with external
linkage that are not called externally.  Declare them `static`.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-3-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: tests: ni_routes_test: Reduce stack usage
Ian Abbott [Wed, 7 Apr 2021 18:13:37 +0000 (19:13 +0100)]
staging: comedi: tests: ni_routes_test: Reduce stack usage

Declare the `unit_tests` array in `ni_routes_unittest()` `static` to
reduce stack usage.

Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-2-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: make rtw_usb_if1_init return a status
Martin Kaiser [Wed, 7 Apr 2021 17:05:31 +0000 (19:05 +0200)]
staging: rtl8188eu: make rtw_usb_if1_init return a status

Return an error status instead of the struct adapter that was allocated
and filled. This is more useful for the probe function, who calls
rtw_usb_if1_init.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: make usb_dvobj_init return a status
Martin Kaiser [Wed, 7 Apr 2021 17:05:30 +0000 (19:05 +0200)]
staging: rtl8188eu: make usb_dvobj_init return a status

usb_dvobj_init populates a struct dvobj_priv and installs it as interface
data of the usb interface. There's no point in returning this struct to the
caller, it makes more sense to return an error status.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: rtw_usb_if1_init needs no dvobj parameter
Martin Kaiser [Wed, 7 Apr 2021 17:05:29 +0000 (19:05 +0200)]
staging: rtl8188eu: rtw_usb_if1_init needs no dvobj parameter

rtw_usb_if1_init receives a pointer to struct usb_interface. dvobj is the
interface data for this interface.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: remove unnecessary variable
Martin Kaiser [Wed, 7 Apr 2021 17:05:28 +0000 (19:05 +0200)]
staging: rtl8188eu: remove unnecessary variable

We just want to check if rtw_usb_if1_init returns NULL, which means there
was an error.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210407170531.29356-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>