linux-2.6-block.git
3 years agostaging: comedi: move out of staging directory
Greg Kroah-Hartman [Wed, 14 Apr 2021 08:58:10 +0000 (10:58 +0200)]
staging: comedi: move out of staging directory

The comedi code came into the kernel back in 2008, but traces its
lifetime to much much earlier.  It's been polished and buffed and
there's really nothing preventing it from being part of the "real"
portion of the kernel.

So move it to drivers/comedi/ as it belongs there.

Many thanks to the hundreds of developers who did the work to make this
happen.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Link: https://lore.kernel.org/r/YHauop4u3sP6lz8j@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove sdio_drv_priv structure
Bryan Brattlof [Wed, 14 Apr 2021 17:39:03 +0000 (17:39 +0000)]
staging: rtl8723bs: remove sdio_drv_priv structure

The sdio_drv_priv structure is a small wrapper around sdio_driver in
linux/mmc/sdio_func.h with an added drv_registered integer.

drv_registered is never used anywhere in the driver and only assigned to
during the sdio registering and unregistering process. We can safely
remove sdio_drv_priv and use the sdio_driver structure directly.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210414173751.317762-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unused argument in function
Fabio Aiuto [Wed, 14 Apr 2021 12:18:50 +0000 (14:18 +0200)]
staging: rtl8723bs: remove unused argument in function

removed unused 'void *sel' argument in rtw_odm_dbg_comp_msg()
function, after DBG_871X_SEL_NL replacement.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1bd83b936584432fdb09406f26ed8a8b66cd4c8d.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration
Fabio Aiuto [Wed, 14 Apr 2021 12:18:49 +0000 (14:18 +0200)]
staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration

remove DBG_871X_SEL_NL obsolete macro declaration.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/8839231b53881c8bf1f8a4d70953ec8acaa2fe95.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()
Fabio Aiuto [Wed, 14 Apr 2021 12:18:48 +0000 (14:18 +0200)]
staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg()

replace DGB_871X_SEL_NL macro with netdev_dbg().

DBG_871X_SEL_NL macro expands to a raw prink call or a
seq_printf if selected stream _is not_ a local
debug symbol set to null.
This second scenario never occurs so replace
all macro usages with netdev_dbg().

This is done with the following coccinelle script:

@@
expression sel;
expression list args;
identifier padapter;
identifier func;
@@

func(..., struct adapter *padapter, ...) {
<...
- DBG_871X_SEL_NL(sel, args);
+ netdev_dbg(padapter->pnetdev, args);
...>
}

fix by hand one coccinelle output newline issue

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9d4597097d75a1900c65e4a15077eb0c8bce1c9b.1618401896.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: fix indentation issue introduced by long line split
Fabio Aiuto [Wed, 14 Apr 2021 08:17:39 +0000 (10:17 +0200)]
staging: rtl8723bs: fix indentation issue introduced by long line split

fix indentation of last line in if condition.

Fixes: af6afdb63f17 (staging: rtl8723bs: split long lines)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/20210414081739.2990-1-fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: removed multiple blank lines
Mitali Borkar [Wed, 14 Apr 2021 06:56:20 +0000 (12:26 +0530)]
staging: rtl8192e: removed multiple blank lines

Removed multiple blank lines to make code better and neater.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/2bfe551f152a611cc49a71a4984f41ef7ee69df5.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: remove unnecessary blank line after close brace
Mitali Borkar [Wed, 14 Apr 2021 06:55:41 +0000 (12:25 +0530)]
staging: rtl8192e: remove unnecessary blank line after close brace

Removed an extra blank line after close brace '{' as it was not
necessary.
Reported by checkpatch

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/40f72a84750f402c342b4685e0a2f15d27875c9a.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: remove unnecessary blank line before brace
Mitali Borkar [Wed, 14 Apr 2021 06:55:21 +0000 (12:25 +0530)]
staging: rtl8192e: remove unnecessary blank line before brace

Removed an extra blank line before close brace as it was not necessary.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/cad6a7885f30dcfabaf1ccab1fd0644416fea194.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: add spaces around binary operators
Mitali Borkar [Wed, 14 Apr 2021 06:55:03 +0000 (12:25 +0530)]
staging: rtl8192e: add spaces around binary operators

Added spaces around binary operators like '+', '*', '|', '-', '&',
to improve readability and to meet linux kernel coding style.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/28cbc4825fdfacf5d5ea8bb688a8bd6a1c65f059.1618380932.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: hal: Remove four set but not used variables
Fabio M. De Francesco [Wed, 14 Apr 2021 06:13:46 +0000 (08:13 +0200)]
staging: rtl8723bs: hal: Remove four set but not used variables

Removed four variables that were set but not used.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210414061346.11423-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove two unused functions
Fabio Aiuto [Tue, 13 Apr 2021 14:56:31 +0000 (16:56 +0200)]
staging: rtl8723bs: remove two unused functions

remove dump_drv_version() and dump_log_level() function
definitions and prototypes. Those functions are unused,
and add unnecessary wrap level to log calls.

They wrap DBG_871X_SEL_NL which will be replaced by
netdev_dbg() with coccinelle script application.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/2e8dd88c053735daed95701140b2f03b4cfe2a2e.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unnecessary dump_drv_version() usage
Fabio Aiuto [Tue, 13 Apr 2021 14:56:30 +0000 (16:56 +0200)]
staging: rtl8723bs: remove unnecessary dump_drv_version() usage

remove unnecessary dump_drv_version() usage.

This prepares dump_drv_version() for removal, before
coccinelle script application.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/9ce6559cac69eaebfdb07206921d14e99d2b1967.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: replace dump_drv_version() usage with netdev_dbg()
Fabio Aiuto [Tue, 13 Apr 2021 14:56:29 +0000 (16:56 +0200)]
staging: rtl8723bs: replace dump_drv_version() usage with netdev_dbg()

replace dump_drv_version() usage with netdev_dbg().

There's no need to further wrap a netdev_dbg() call
for such a low number of occurrences.

The string printed is the same contained in DBG_871X_SEL_NL macro
called inside dump_drv_version().

This is just preparation before bulk DBG_871X_SEL_NL macro
replacement by coccinelle, as the semantic patch that will be
used just replaces, doesn't remove.

Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/a4df375dba6c004a22cf197ff8d498d0e4f3b52e.1618325614.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: core: Remove unused but set variable
Fabio M. De Francesco [Tue, 13 Apr 2021 15:05:17 +0000 (17:05 +0200)]
staging: rtl8723bs: core: Remove unused but set variable

Removed "ledBlink_param" because it was set to the value of "pbuf" but was
never reused. This set was made by direct assignment (no helper had been
called), therefore it had no side effect to the location pointed by "pbuf".

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210413150517.12533-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8188eu: Move channel_table away from rtw_mlme_ext.h
Fabio M. De Francesco [Tue, 13 Apr 2021 10:20:33 +0000 (12:20 +0200)]
staging: rtl8188eu: Move channel_table away from rtw_mlme_ext.h

Moved "static const struct channel_table[]" from include/rtw_mlme_ext.h
to core/rtw_ioctl_set.c because the latter is the only file that uses
that array of struct(s) in the whole driver. "make rtl8188eu/ W=1" output
several warnings about "'channel_table' defined but not used
[-Wunused-const-variable=]".

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20210413102033.24781-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: comedi: adv_pci_dio: remove whitespace
Mikko Talikka [Tue, 13 Apr 2021 08:16:37 +0000 (10:16 +0200)]
staging: comedi: adv_pci_dio: remove whitespace

Fixed checkpatch.pl warning:

CHECK: Blank lines aren't necessary before a close brace '}'
+
+               }

Signed-off-by: Mikko Talikka <mikko.talikka@live.com>
Link: https://lore.kernel.org/r/AM0PR01MB42597C4CAA1B9E51D4AE3D5E974F9@AM0PR01MB4259.eurprd01.prod.exchangelabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: fieldbus: simplify devm_anybuss_host_common_probe
Tian Tao [Tue, 13 Apr 2021 00:53:03 +0000 (08:53 +0800)]
staging: fieldbus: simplify devm_anybuss_host_common_probe

Use devm_add_action_or_reset() instead of devres_alloc() and
devres_add(), which works the same. This will simplify the
code. There is no functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1618275183-56792-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8192e: remove unnecessary ftrace-like logging
Mitali Borkar [Tue, 13 Apr 2021 03:25:41 +0000 (08:55 +0530)]
staging: rtl8192e: remove unnecessary ftrace-like logging

Removed unncessary 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/460ba9cdd256bf1064c4e3a694caa046171cb60e.1618283232.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: remove unnecessary adapter
Bryan Brattlof [Mon, 12 Apr 2021 17:23:08 +0000 (17:23 +0000)]
staging: rtl8723bs: remove unnecessary adapter

The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv
structure but never used anywhere in the driver. This will remove all
definitions of if2

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
Link: https://lore.kernel.org/r/20210412172147.43509-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: hal: Correct indentation
Beatriz Martins de Carvalho [Mon, 12 Apr 2021 16:29:38 +0000 (17:29 +0100)]
staging: rtl8723bs: hal: Correct indentation

Correct random indentation to improve readability. This problem
was observed when working on other checkpatch reports in the
file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/68e91c54a3be0b57607101fa8b284c00bb7dff1a.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: hal: Remove extra blank line
Beatriz Martins de Carvalho [Mon, 12 Apr 2021 16:29:37 +0000 (17:29 +0100)]
staging: rtl8723bs: hal: Remove extra blank line

Remove multiple blank lines to conform Linux kernel coding style.
Reported by checkpatch in file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/7f48b48d92b54c1f5db29f0d23c8c1c666236c43.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: rtl8723bs: hal: remove space before tabs
Beatriz Martins de Carvalho [Mon, 12 Apr 2021 16:29:36 +0000 (17:29 +0100)]
staging: rtl8723bs: hal: remove space before tabs

Remove unnecessary space before tabs to conform with Linux kernel
coding style.
Reported by checkpatch in file Hal8723BReg.h

Signed-off-by: Beatriz Martins de Carvalho <martinsdecarvalhobeatriz@gmail.com>
Link: https://lore.kernel.org/r/9694aafb614bdcbb15fdea614502c1b31a534871.1618243073.git.martinsdecarvalhobeatriz@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vc04_services: TODO: rectify spelling mistake
Mitali Borkar [Mon, 12 Apr 2021 10:44:27 +0000 (16:14 +0530)]
staging: vc04_services: TODO: rectify spelling mistake

Corrected the misspelled word.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/967c328610909bc010b0bb82a1f89b71a57fa7a3.1618223171.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vc04_services: TODO: remove trailing whitespace
Mitali Borkar [Mon, 12 Apr 2021 10:44:09 +0000 (16:14 +0530)]
staging: vc04_services: TODO: remove trailing whitespace

Removed trailing whitespace to adhere to linux kernel coding style.
Reported by checkpatch.

Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
Link: https://lore.kernel.org/r/5a54a06bae846f1f037165c0c7ba7ffe5a55a4a8.1618223171.git.mitaliborkar810@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: vchiq_core: split exit conditions
Stefan Wahren [Sun, 11 Apr 2021 18:11:40 +0000 (20:11 +0200)]
staging: vchiq_core: split exit conditions

Some exit conditions are rather complex. So better split them up.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1618164700-21150-11-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>