linux-2.6-microblaze.git
2 years agostaging: rtl8192u: make const array queuetopipe const, reduces object code size
Colin Ian King [Sat, 7 May 2022 18:34:14 +0000 (19:34 +0100)]
staging: rtl8192u: make const array queuetopipe const, reduces object code size

Don't populate the const array queuetopipe on the stack, instead make it
static.  Also makes the object code smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220507183414.26633-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused IEEE_* defines
Martin Kaiser [Mon, 2 May 2022 20:06:52 +0000 (22:06 +0200)]
staging: r8188eu: remove unused IEEE_* defines

The IEEE_* defines in the driver's ieee80211.h header file are not used.
Remove them.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use standard category defines
Martin Kaiser [Mon, 2 May 2022 20:06:51 +0000 (22:06 +0200)]
staging: r8188eu: use standard category defines

Replace some of the driver-specific defines for action categories with the
defines from ieee80211.h.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use ieee80211_mgmt for action category
Martin Kaiser [Mon, 2 May 2022 20:06:50 +0000 (22:06 +0200)]
staging: r8188eu: use ieee80211_mgmt for action category

Use the struct ieee80211_mgmt from ieee80211.h to read the action
category. There's no need to parse the incoming frame ourselves.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: replace OnAction_tbl with switch-case
Martin Kaiser [Mon, 2 May 2022 20:06:49 +0000 (22:06 +0200)]
staging: r8188eu: replace OnAction_tbl with switch-case

OnAction_tbl has only three entries. It's simpler to use a switch
statement instead of iterating over the table.

We can then remove the table itself and struct action_handler, which was
used only for the table entries.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove an unused category define
Martin Kaiser [Mon, 2 May 2022 20:06:48 +0000 (22:06 +0200)]
staging: r8188eu: remove an unused category define

RTW_WLAN_CATEGORY_TDLS is not used. Remove the define.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove action_handler string
Martin Kaiser [Mon, 2 May 2022 20:06:47 +0000 (22:06 +0200)]
staging: r8188eu: remove action_handler string

Remove the unused str component from struct action_handler and the
corresponding entries in OnAction_tbl.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused action handler prototypes
Martin Kaiser [Mon, 2 May 2022 20:06:46 +0000 (22:06 +0200)]
staging: r8188eu: remove unused action handler prototypes

For some action categories, we removed the handler function, but we forgot
the prototypes. Remove them as well.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: action category wmm is not used
Martin Kaiser [Mon, 2 May 2022 20:06:45 +0000 (22:06 +0200)]
staging: r8188eu: action category wmm is not used

The r8188eu driver does not handle the wmm action category. Remove the
empty handler function, the entry in OnAction_tbl and the define for the
category.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: action category ht is not used
Martin Kaiser [Mon, 2 May 2022 20:06:44 +0000 (22:06 +0200)]
staging: r8188eu: action category ht is not used

The r8188eu driver does not handle the ht action category. Remove the
empty handler function, the entry in OnAction_tbl and the define for the
category.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220502200652.143665-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Replace unused return value of vt6655_get_current_tsf
Philipp Hortmann [Sun, 1 May 2022 20:25:41 +0000 (22:25 +0200)]
staging: vt6655: Replace unused return value of vt6655_get_current_tsf

Replace unused return value with u64 to increase readability,
reduce address and dereference operators and omit pqwCurrTSF that
uses CamelCase which is not accepted by checkpatch.pl

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/62c83d78627196ec0ce2f5a562cb080a1c87a05a.1651435890.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Rename function CARDbGetCurrentTSF
Philipp Hortmann [Sun, 1 May 2022 20:25:35 +0000 (22:25 +0200)]
staging: vt6655: Rename function CARDbGetCurrentTSF

The name of the function uses CamelCase which
is not accepted by checkpatch.pl

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2b92db8d67e8dd1fc85b45efe3b32d2199371190.1651435890.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Added missing BE support in CARDbGetCurrentTSF
Philipp Hortmann [Sun, 1 May 2022 19:12:29 +0000 (21:12 +0200)]
staging: vt6655: Added missing BE support in CARDbGetCurrentTSF

Added missing big-endian support in CARDbGetCurrentTSF.

Reported-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/25c80e3eb889ef2e530f26b4a97a9f5fe88e01ab.1651431640.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Replace VNSvInPortD with ioread32
Philipp Hortmann [Sun, 1 May 2022 19:12:23 +0000 (21:12 +0200)]
staging: vt6655: Replace VNSvInPortD with ioread32

Replace macro VNSvInPortD with ioread32 and as it was
the only user, it can now be removed.
The name of macro and the arguments use CamelCase which
is not accepted by checkpatch.pl

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3945d32053898e5f9771d6f742ae118ca56943ce.1651431640.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: Remove broken rtw_p2p_get function.
Charlie Sands [Sat, 30 Apr 2022 04:28:59 +0000 (00:28 -0400)]
staging: r8188eu: Remove broken rtw_p2p_get function.

Removes broken and unsafe rtw_p2p_get function and all of the code
associated with it from the r8188eu driver.

Signed-off-by: Charlie Sands <charlies256@protonmail.com>
Link: https://lore.kernel.org/r/Ymy7C/A2q+VzfBhO@sckzor-linux.localdomain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop redundant check in _rtw_free_mlme_priv
Vihas Makwana [Wed, 27 Apr 2022 16:57:49 +0000 (22:27 +0530)]
staging: r8188eu: drop redundant check in _rtw_free_mlme_priv

There's a NULL check on pmlmepriv in rtw_mlme.c:112 which makes no sense
as rtw_free_mlme_priv_ie_data() dereferences it unconditionally and it
would have already crashed at this point.
Remove this redundant check.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220427165748.10584-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused else condition
Jaehee Park [Wed, 27 Apr 2022 15:32:03 +0000 (11:32 -0400)]
staging: r8188eu: remove unused else condition

rtw_select_and_join_from_scanned_queue() cannot return '2' so this
else condition is unused. Remove this unnecessary else statement.

Suggested-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
Link: https://lore.kernel.org/r/20220427153203.GA503502@jaehee-ThinkPad-X1-Extreme
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unused semaphore "allrxreturnevt"
Vihas Makwana [Wed, 27 Apr 2022 19:00:54 +0000 (00:30 +0530)]
staging: r8188eu: remove unused semaphore "allrxreturnevt"

The semaphore allrxreturnevt of struct recv_priv is initialized but not
used anywhere in the code.
Remove the initialization and the structure member.

Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220427190054.17841-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: greybus: correct typo in comment
Nickalas Cason [Sat, 30 Apr 2022 23:01:39 +0000 (19:01 -0400)]
staging: greybus: correct typo in comment

Correct misspelling in comment. Issue found with checkpatch.

Signed-off-by: Nickalas Cason <nickalas@cason.dev>
Link: https://lore.kernel.org/r/20220430230139.7i772mvejlhevamn@desktop
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vc04_services: Re-use generic struct s32_fract
Andy Shevchenko [Wed, 4 May 2022 09:29:15 +0000 (12:29 +0300)]
staging: vc04_services: Re-use generic struct s32_fract

Instead of custom data type re-use generic struct s32_fract.
No changes intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220504092915.72021-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Replace MACvReadISR with VNSvInPortD
Philipp Hortmann [Wed, 27 Apr 2022 05:42:18 +0000 (07:42 +0200)]
staging: vt6655: Replace MACvReadISR with VNSvInPortD

Replace macro MACvReadISR with VNSvInPortD and as it was the only
user, it can now be removed.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/ddd403a3f590cb81403197442b12c3986c98ba25.1651036713.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Replace MACvReadMIBCounter with VNSvInPortD
Philipp Hortmann [Wed, 27 Apr 2022 05:42:13 +0000 (07:42 +0200)]
staging: vt6655: Replace MACvReadMIBCounter with VNSvInPortD

Replace macro MACvReadMIBCounter with VNSvInPortD and as it
was the only user, it can now be removed.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e1b7156e2c689cf53c738642fd9b33816ec89f92.1651036713.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Replace VNSvInPortW with ioread16
Philipp Hortmann [Sun, 24 Apr 2022 07:44:05 +0000 (09:44 +0200)]
staging: vt6655: Replace VNSvInPortW with ioread16

Replace macro VNSvInPortW with ioread16.
The name of macro and the arguments use CamelCase which
is not accepted by checkpatch.pl

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/2d55e245cc530ffafe53384df03691d1b29b495c.1650784817.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove u16 cast for u16 return value
Solomon Tan [Sat, 23 Apr 2022 13:01:50 +0000 (21:01 +0800)]
staging: rtl8192e: Remove u16 cast for u16 return value

Remove explicit u16 cast of the function Mk16 return value.
The variable hi does not need to be casted explicitly to u16 as it will
already be casted implicitly.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-8-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove u16 cast for u32 parameter
Solomon Tan [Sat, 23 Apr 2022 13:01:49 +0000 (21:01 +0800)]
staging: rtl8192e: Remove u16 cast for u32 parameter

The explicit u16 cast is not necessary because rtl92e_eeprom_read's
second parameter is defined to be u32.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-7-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove unnecessary u16 argument cast
Solomon Tan [Sat, 23 Apr 2022 13:01:48 +0000 (21:01 +0800)]
staging: rtl8192e: Remove unnecessary u16 argument cast

Remove the explicit u16 casts for u16 argument in the function call. This
function has declared its parameter to be of type u16, so the argument
given to that parameter will be automatically coerced to u16. Therefore,
an explicit cast is unnecessary.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-6-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove unnecessary u16 assignment cast
Solomon Tan [Sat, 23 Apr 2022 13:01:47 +0000 (21:01 +0800)]
staging: rtl8192e: Remove unnecessary u16 assignment cast

Remove the explicit casts in assignment statements for u16 variables.
Because these variables are declared as u16, there is implicit
conversion to u16 during the assignment, so an explicit cast is
unnecessary.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-5-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove unnecessary u8 cast in comparison
Solomon Tan [Sat, 23 Apr 2022 13:01:46 +0000 (21:01 +0800)]
staging: rtl8192e: Remove unnecessary u8 cast in comparison

Since the macro VERSION_8190_BD is defined to be 0x3, and the structure
members card_8192_version and IC_Cut are both u8, an explicit u8 cast is
unnecessary.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-4-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove unnecessary u8 argument cast
Solomon Tan [Sat, 23 Apr 2022 13:01:45 +0000 (21:01 +0800)]
staging: rtl8192e: Remove unnecessary u8 argument cast

Remove the unnecessary explicit u8 casts for u8 arguments in function
calls. These functions have declared their parameters to be of type u8,
so the arguments given to those parameters will be automatically coerced
to u8. Therefore, an explicit cast is unnecessary.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-3-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove unnecessary u8 assignment cast
Solomon Tan [Sat, 23 Apr 2022 13:01:44 +0000 (21:01 +0800)]
staging: rtl8192e: Remove unnecessary u8 assignment cast

Remove the explicit casts in assignment statements for u8 variables.
Because these variables are declared as u8, there is implicit conversion
to u8 during the assignment, so an explicit cast is unnecessary.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-2-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop unnecessary wrapper _rtw_dequeue_cmd
Vihas Makwana [Fri, 22 Apr 2022 19:32:23 +0000 (01:02 +0530)]
staging: r8188eu: drop unnecessary wrapper _rtw_dequeue_cmd

Drop unnecessary wrapper _rtw_dequeue_cmd and move its logic to
rtw_dequeue_cmd.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-8-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop unnecessary wrapper _rtw_alloc_network
Vihas Makwana [Fri, 22 Apr 2022 19:32:22 +0000 (01:02 +0530)]
staging: r8188eu: drop unnecessary wrapper _rtw_alloc_network

Drop unnecessary wrapper _rtw_alloc_network and move its logic to
rtw_alloc_network.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-7-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop unnecessary wrapper _rtw_free_mlme_priv
Vihas Makwana [Fri, 22 Apr 2022 19:32:21 +0000 (01:02 +0530)]
staging: r8188eu: drop unnecessary wrapper _rtw_free_mlme_priv

Drop unnecessary wrapper _rtw_free_mlme_priv and move its logic to
rtw_free_mlme_priv.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-6-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop unnecessary wrapper _rtw_init_mlme_priv
Vihas Makwana [Fri, 22 Apr 2022 19:32:20 +0000 (01:02 +0530)]
staging: r8188eu: drop unnecessary wrapper _rtw_init_mlme_priv

Drop unnecessary wrapper _rtw_init_mlme_priv and move its logic to
rtw_init_mlme_priv.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-5-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop unnecessary wrapper _rtw_init_evt_priv
Vihas Makwana [Fri, 22 Apr 2022 19:32:19 +0000 (01:02 +0530)]
staging: r8188eu: drop unnecessary wrapper _rtw_init_evt_priv

Drop unnecessary wrapper _rtw_init_evt_priv and move its logic to
rtw_init_evt_priv.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-4-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop unnecessary wrapper _rtw_init_cmd_priv
Vihas Makwana [Fri, 22 Apr 2022 19:32:18 +0000 (01:02 +0530)]
staging: r8188eu: drop unnecessary wrapper _rtw_init_cmd_priv

Drop unnecessary wrapper _rtw_init_cmd_priv and move its logic to
rtw_init_cmd_priv.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-3-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: drop unnecessary wrapper _rtw_free_cmd_priv
Vihas Makwana [Fri, 22 Apr 2022 19:32:17 +0000 (01:02 +0530)]
staging: r8188eu: drop unnecessary wrapper _rtw_free_cmd_priv

Drop unnecessary wrapper _rtw_free_cmd_priv and move its logic to
rtw_free_cmd_priv.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-2-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: greybus: tools: fix spelling
Vaibhav Nagare [Mon, 25 Apr 2022 13:31:11 +0000 (19:01 +0530)]
staging: greybus: tools: fix spelling

Fixed the spelling mistake of appendation to appending.

Signed-off-by: Vaibhav Nagare <vnagare@redhat.com>
Link: https://lore.kernel.org/r/20220425133111.118257-1-vnagare@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vc04_services: Re-add dependency on HAS_DMA to BCM2835_VCHIQ
Geert Uytterhoeven [Mon, 25 Apr 2022 12:18:25 +0000 (14:18 +0200)]
staging: vc04_services: Re-add dependency on HAS_DMA to BCM2835_VCHIQ

Thanks to stubs for the NO_DMA=y case, drivers that use the DMA API can
be compile-tested on systems that do not support DMA.  Hence the
dependency of BCM2835_VCHIQ on HAS_DMA was dropped to increase compile
coverage.

Unfortunately compilers became smarter, leading to new failures.
E.g. for a CONFIG_SUN3=y allmodconfig kernel with gcc 9.4.0:

    drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In function â€˜free_pagelist’:
    arch/m68k/include/asm/string.h:72:25: warning: argument 2 null where non-null expected [-Wnonnull]
       72 | #define memcpy(d, s, n) __builtin_memcpy(d, s, n)
  |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:614:4: note: in expansion of macro â€˜memcpy’
      614 |    memcpy((char *)kmap(pages[0]) +
  |    ^~~~~~
    arch/m68k/include/asm/string.h:72:25: note: in a call to built-in function â€˜__builtin_memcpy’
       72 | #define memcpy(d, s, n) __builtin_memcpy(d, s, n)
  |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:614:4: note: in expansion of macro â€˜memcpy’
      614 |    memcpy((char *)kmap(pages[0]) +
  |    ^~~~~~

This happens because the compiler can trace back the source pointer to a
allocation by dma_alloc_attrs(), which always returns NULL if NO_DMA=y.

Avoid this reinstating the dependency of the BCM2835_VCHIQ symbol on
HAS_DMA, and by restricting the selection of BCM2835_VCHIQ.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/da55bd87eebf1a969dc8ccd807843319833f6c40.1650888813.git.geert@linux-m68k.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agoRevert "staging: r8188eu: use in-kernel ieee channel"
Solomon Tan [Mon, 25 Apr 2022 05:28:03 +0000 (13:28 +0800)]
Revert "staging: r8188eu: use in-kernel ieee channel"

This reverts commit 0afaa121813ed602bd203759c339cb639493f8c2 as changing
rtw_ieee80211_channel to ieee80211_channel causes a memcpy bug as
reported in:
https://lore.kernel.org/linux-staging/67e2d10b-7f0f-9c5a-ce31-376b83ffba9e@gmail.com/
due to their size differences.

Fixes: 0afaa121813e ("staging: r8188eu: use in-kernel ieee channel")
Reported-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220425052802.2419-1-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: bcm2835-audio: delete TODO
Adrien Thierry [Wed, 20 Apr 2022 17:44:00 +0000 (13:44 -0400)]
staging: bcm2835-audio: delete TODO

Delete TODO since all tasks were completed:

1 - fixed here:
https://lore.kernel.org/all/20220408150359.26661-1-athierry@redhat.com/

2 - there are no remaining checkpatch.pl errors or warnings

Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20220420174401.305964-1-athierry@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192u: Fix signedness bug in ieee80211_check_auth_response()
Haowen Bai [Fri, 22 Apr 2022 02:10:35 +0000 (10:10 +0800)]
staging: rtl8192u: Fix signedness bug in ieee80211_check_auth_response()

The ieee80211_check_auth_response() function has a signedness bug because
it's a declared as a u16 but it return -ENOMEM.  When you look at it more
closely it returns a mix of error codes including 0xcafe, -ENOMEM, and
a->status which is WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG.  This is a mess.

Clean it up to just return standard kernel error codes.  We can print
out the a->status before returning a regular error code.  The printks
in the caller need to be adjusted as well.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650593435-9017-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: Remove unneeded variable ret in rtw_suspend()
Wan Jiabing [Fri, 22 Apr 2022 02:10:38 +0000 (10:10 +0800)]
staging: r8188eu: Remove unneeded variable ret in rtw_suspend()

Fix the following coccicheck error:
drivers/staging/r8188eu/os_dep/usb_intf.c:202:5-8: Unneeded variable: "ret". Return "0" on line 242

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20220422021046.121870-1-wanjiabing@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: fieldbus: Fix the error handling path in anybuss_host_common_probe()
Christophe JAILLET [Fri, 22 Apr 2022 06:48:18 +0000 (08:48 +0200)]
staging: fieldbus: Fix the error handling path in anybuss_host_common_probe()

If device_register() fails, device_unregister() should not be called
because it will free some resources that are not allocated.
put_device() should be used instead.

Fixes: 308ee87a2f1e ("staging: fieldbus: anybus-s: support HMS Anybus-S bus")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5401a519608d6e1a4e7435c20f4f20b0c5c36c23.1650610082.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vchiq:remove unneeded flush_workqueue
ran jianping [Fri, 22 Apr 2022 09:33:40 +0000 (09:33 +0000)]
staging: vchiq:remove unneeded flush_workqueue

All work currently pending will be done first by calling destroy_workqueue,
so there is no need to flush it explicitly.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
Link: https://lore.kernel.org/r/20220422093340.2781311-1-ran.jianping@zte.com.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: fix the index check in mgt_dispatcher
Martin Kaiser [Fri, 22 Apr 2022 14:09:58 +0000 (16:09 +0200)]
staging: r8188eu: fix the index check in mgt_dispatcher

In mgt_dispatcher, we check that index is a valid index for the
mlme_sta_tbl array. The valid indices for this array are from 0 to
ARRAY_SIZE(mlme_sta_tbl) - 1.

An invalid index is >= ARRAY_SIZE(mlme_sta_tbl). Fix the off by one error
in the check.

Fixes: db84803cd8de ("staging: r8188eu: use ARRAY_SIZE for mlme_sta_tbl")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220422140958.239767-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vme: Move 'vme/devices/' to 'vme_user/'
Bruno Moreira-Guedes [Thu, 21 Apr 2022 14:59:34 +0000 (11:59 -0300)]
staging: vme: Move 'vme/devices/' to 'vme_user/'

In <db3b9e990e75573402cda22faf933760f076c033> ("Staging: VME: move VME
drivers out of staging") the vme code, board and bridge drivers were
moved out of the staging tree, remaining only the VME user device
driver.

Since this driver is the only one remaining in staging, such multi-level
structure confuses more than helps. The current structure is as follows:

 - drivers/staging/vme/
                       Makefile
                       devices/
                               Kconfig
                               Makefile
                               vme_user.c
                               vme_user.h

The top-level Makefile has the only function of calling another Makefile
into the devices/ subdirectory. This latter only compiles the vme_user
driver, since there is no other in the staging tree.

This patch removes the unnecessary Makefile from the 'vme/' dir, move
the contents of 'vme/devices' into the 'vme/' dir, and renames it to
'vme_user/' (the driver name), allowing a straightforward understanding
of this driver's contents. Furthermore, it updates the MAINTAINERS file
to properly reflect the new paths.

Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev>
Link: https://lore.kernel.org/r/2cd7de9a426c443a5ea618682d605ecfd751d798.1650544175.git.codeagain@codeagain.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vme: Add VME_BUS dependency to Kconfig
Bruno Moreira-Guedes [Thu, 21 Apr 2022 14:59:02 +0000 (11:59 -0300)]
staging: vme: Add VME_BUS dependency to Kconfig

The KConfig file for VME_USER ('drivers/staging/vme/devices/Kconfig')
sourced at "drivers/vme/boards/KConfig" misses a `depends on` line for
VME_BUS, which is unnoticeable for menuconfig users who aren't be able
to select it through this interface without setting the CONFIG_VME_BUS
option because it's nested on VME_BUS menu entry.

A patch to move appropriately this driver to the "Staging" submenu
([PATCH 1/3], originally sent as a single patch submitted at
https://lore.kernel.org/linux-staging/3fbc5325e94b9ae0666a1f5a56a4e5372bfcea1d.camel@codeagain.dev/T/#t),
however, unveiled this missing `depends on` line, since it moved the
`source` line for VME_USER's KConfig to somewhere else, allowing it to
be compiled without the support for VME_BUS. While it compiles fine and
seems to initialize the driver fine (tested both as module and as built-
in), it seems to make no sense having VME_USER without VME_BUS.

This patches addresses it by adding the VME_BUS to the `depends on` line
at "drivers/staging/vme/devices/Kconfig".

Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev>
Link: https://lore.kernel.org/r/00de5644d7c2f8c8878eccf86b761e0602732089.1650544175.git.codeagain@codeagain.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vme: Move vme_user to staging KConfig
Bruno Moreira-Guedes [Thu, 21 Apr 2022 14:58:24 +0000 (11:58 -0300)]
staging: vme: Move vme_user to staging KConfig

Currently, the VME_USER driver is in the staging tree Kconfig, unlike
other VME drivers already moved to the main portions of the kernel tree.
Its configuration is, however, nested into the VME_BUS config option,
which might be misleading.

Since the staging tree "[...] is used to hold stand-alone drivers and
filesystem that are not ready to be merged into the main portion of the
Linux kernel tree [...]"(from
https://lore.kernel.org/all/20090320172502.GA14647@kroah.com/T/),
staging drivers should appear nested into the Main Menu -> Device
Drivers -> Staging Drivers to make sure the user don't pick it without
being fully aware of its staging status as it could be the case in
Menu -> Device Drivers -> VME bridge support (the current location).

With this change menuconfig users will clearly know this is not a driver
in the main portion of the kernel tree and decide whether to build it or
not with that clearly in mind.

This change goes into the same direction of commit
<4b4cdf3979c32fa3d042d150f49449c74d048553> ("STAGING: Move staging
drivers back to staging-specific menu")

Signed-off-by: Bruno Moreira-Guedes <codeagain@codeagain.dev>
Link: https://lore.kernel.org/r/f6e6d1d2b02385f11848022f154007ef191181c1.1650544175.git.codeagain@codeagain.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use in-kernel ieee channel
Solomon Tan [Thu, 21 Apr 2022 23:52:38 +0000 (07:52 +0800)]
staging: r8188eu: use in-kernel ieee channel

Use the in-kernel structure and flags instead of defining a separate
one. The rtw_ieee80211_channel structure and flags can be replaced by
the ieee80211_channel defined in include/net/cfg80211.h since the flags
serve the same purpose and the ieee80211_channel struct includes the
elements used in the rtw_ieee80211_channel struct.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220421235237.4218-1-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: correct typo in comments
Jaehee Park [Thu, 21 Apr 2022 19:20:31 +0000 (15:20 -0400)]
staging: r8188eu: correct typo in comments

Correct misspellings in the comments. Issue found with checkpatch.

Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
Link: https://lore.kernel.org/r/56b25e4394396823d52f1fe1b312c5a307aea0fc.1650568579.git.jhpark1013@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: replace spaces with tabs
Jaehee Park [Thu, 21 Apr 2022 19:20:30 +0000 (15:20 -0400)]
staging: r8188eu: replace spaces with tabs

Use tabs instead of spaces. Issue found with checkpatch.
WARNING: suspect code indent for conditional statements

Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
Link: https://lore.kernel.org/r/fd4a66013be081bc5adb491c6dc7774362d1ac82.1650568579.git.jhpark1013@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove 'added by' author comments
Jaehee Park [Thu, 21 Apr 2022 19:20:28 +0000 (15:20 -0400)]
staging: r8188eu: remove 'added by' author comments

Author comments "Added by Albert" and "Added by Annie" are sprinkled
through the file. These comments are not useful and can be removed.

Suggested-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
Link: https://lore.kernel.org/r/dd22bbe6b018aadec620d1ef8215e19852099f7c.1650568579.git.jhpark1013@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove spaces before tabs
Jaehee Park [Thu, 21 Apr 2022 19:20:27 +0000 (15:20 -0400)]
staging: r8188eu: remove spaces before tabs

Delete spaces before tabs in the comments. Issue found with checkpatch.
WARNING: please, no space before tabs

Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
Link: https://lore.kernel.org/r/1b1e8cda03ca5d3fdf26c511da76258f7a2ab8d5.1650568579.git.jhpark1013@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove unnecessary braces in single statement block
Jaehee Park [Thu, 21 Apr 2022 19:20:26 +0000 (15:20 -0400)]
staging: r8188eu: remove unnecessary braces in single statement block

Remove braces for single statement block to minimize the number of
empty lines, without loss of readability. Issue found with checkpatch.
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
Link: https://lore.kernel.org/r/b96ae957e2ddc519e56813a1c56e770168f67a2d.1650568579.git.jhpark1013@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove OnAction_dls
Martin Kaiser [Thu, 21 Apr 2022 20:08:04 +0000 (22:08 +0200)]
staging: r8188eu: remove OnAction_dls

Remove the empty function OnAction_dls and its entry in OnAction_tbl.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220421200805.192083-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove OnAction_qos
Martin Kaiser [Thu, 21 Apr 2022 20:08:03 +0000 (22:08 +0200)]
staging: r8188eu: remove OnAction_qos

Remove the empty function OnAction_qos and its entry in OnAction_tbl.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220421200805.192083-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: on_action_spct does nothing
Martin Kaiser [Thu, 21 Apr 2022 20:08:02 +0000 (22:08 +0200)]
staging: r8188eu: on_action_spct does nothing

One of the entries in OnAction_tbl refers to on_action_spct. This function
reads some information but it performs no action. Remove on_action_spct
and its entry in OnAction_tbl.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220421200805.192083-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove dummy entries from OnAction_tbl
Martin Kaiser [Thu, 21 Apr 2022 20:08:01 +0000 (22:08 +0200)]
staging: r8188eu: remove dummy entries from OnAction_tbl

Unlike mlme_sta_tbl, OnAction_tbl is an array of structs.

OnAction iterates over the array to find the entry for a specific action
category. No action is performed if a category has no entry.

We can remove the entries that point to the dummy function DoReserved.
These were the last users of DoReserved, the function itself can be
removed as well.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220421200805.192083-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove OnAtim
Martin Kaiser [Thu, 21 Apr 2022 20:04:49 +0000 (22:04 +0200)]
staging: r8188eu: remove OnAtim

Remove the empty OnAtim function. We can set the function pointer in
mlme_sta_tbl to NULL if no action is required for this management frame
subtype.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220421200449.191983-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp()
Haowen Bai [Thu, 21 Apr 2022 08:21:17 +0000 (16:21 +0800)]
staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp()

The rtllib_rx_assoc_resp() function has a signedness bug because it's
a declared as a u16 but it return -ENOMEM.  When you look at it more
closely it returns a mix of error codes including 0xcafe, -ENOMEM, and
a->status which is WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG.  This is a mess.

Clean it up to just return standard kernel error codes.  We can print
out the a->status before returning a regular error code.  The printks
in the caller need to be adjusted as well.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650529277-7893-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: Drop redundant memset
Haowen Bai [Thu, 21 Apr 2022 09:20:43 +0000 (17:20 +0800)]
staging: r8188eu: Drop redundant memset

The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy. So we drop redundant memset.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650532843-28132-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8723bs: remove leftover code for other chips
Artur Bujdoso [Thu, 21 Apr 2022 06:52:19 +0000 (08:52 +0200)]
staging: rtl8723bs: remove leftover code for other chips

Clean up unreferenced definitions in hal headers and code.

Signed-off-by: Artur Bujdoso <artur.bujdoso@gmail.com>
Link: https://lore.kernel.org/r/YmD/I19v8sJLrOQo@crux
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192u: change get_key functions to return 0 instead of -1
Rebecca Mckeever [Wed, 20 Apr 2022 12:23:28 +0000 (07:23 -0500)]
staging: rtl8192u: change get_key functions to return 0 instead of -1

Currently, these three get_key functions return -1 when the provided len
value is less a specific key length value, which can result in buffer
overflow depending on how the returned value is used. These functions are
used in three places in ieee80211/ieee80211_wx.c:

  ieee80211_wx_get_encode() :
    The behavior of this function will be unchanged.

  ieee80211_wx_get_encode_ext() :
    The result of the get_key function is written to ext->key_len,
    resulting in a buffer overflow if the result is negative.

  ieee80211_wx_set_encode() :
    The behavior of this function will change. When len is less than the
    key length value, it will set a default key of all 0.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Link: https://lore.kernel.org/r/Yl/7QPKXer7YtXOs@bertie
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192e: Remove space after cast
Solomon Tan [Tue, 19 Apr 2022 12:43:19 +0000 (20:43 +0800)]
staging: rtl8192e: Remove space after cast

This patch addresses the checkpatch.pl flag that there should not be a
space after a cast.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220419124318.8028-1-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agodrivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()
Duoming Zhou [Sun, 17 Apr 2022 14:16:41 +0000 (22:16 +0800)]
drivers: staging: rtl8192e: Fix deadlock in rtllib_beacons_stop()

There is a deadlock in rtllib_beacons_stop(), which is shown
below:

   (Thread 1)              |      (Thread 2)
                           | rtllib_send_beacon()
rtllib_beacons_stop()      |  mod_timer()
 spin_lock_irqsave() //(1) |  (wait a time)
 ...                       | rtllib_send_beacon_cb()
 del_timer_sync()          |  spin_lock_irqsave() //(2)
 (wait timer to stop)      |  ...

We hold ieee->beacon_lock in position (1) of thread 1 and
use del_timer_sync() to wait timer to stop, but timer handler
also need ieee->beacon_lock in position (2) of thread 2.
As a result, rtllib_beacons_stop() will block forever.

This patch extracts del_timer_sync() from the protection of
spin_lock_irqsave(), which could let timer handler to obtain
the needed lock.

Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20220417141641.124388-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agodrivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop()
Duoming Zhou [Sun, 17 Apr 2022 13:54:07 +0000 (21:54 +0800)]
drivers: staging: rtl8192u: Fix deadlock in ieee80211_beacons_stop()

There is a deadlock in ieee80211_beacons_stop(), which is shown below:

   (Thread 1)              |      (Thread 2)
                           | ieee80211_send_beacon()
ieee80211_beacons_stop()   |  mod_timer()
 spin_lock_irqsave() //(1) |  (wait a time)
 ...                       | ieee80211_send_beacon_cb()
 del_timer_sync()          |  spin_lock_irqsave() //(2)
 (wait timer to stop)      |  ...

We hold ieee->beacon_lock in position (1) of thread 1 and use
del_timer_sync() to wait timer to stop, but timer handler
also need ieee->beacon_lock in position (2) of thread 2.
As a result, ieee80211_beacons_stop() will block forever.

This patch extracts del_timer_sync() from the protection of
spin_lock_irqsave(), which could let timer handler to obtain
the needed lock.

Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20220417135407.109536-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192u: compare strcmp result to zero
Rebecca Mckeever [Sat, 16 Apr 2022 10:24:34 +0000 (05:24 -0500)]
staging: rtl8192u: compare strcmp result to zero

Add " == 0" to the condition in both else if branches to address a
possible bug. strcmp returns 0 when its arguments are equal, which
evaluates to false, often leading to errors when used in if statements.

Currently, the statement in the first else if branch does not execute
when its arguments are equal, but it does execute when crypt->ops->name
equals any string other than "WEP" or "TKIP".

Similarly, the second else if branch does not execute when its arguments
are equal, and it only executes when crypt->ops->name equals "TKIP".
The else branch never executes.

It is unlikely that this is working as intended.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Link: https://lore.kernel.org/r/20220416102434.97567-1-remckee0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: iio: ad2s1210: remove redundant assignment to variable negative
Colin Ian King [Mon, 18 Apr 2022 13:46:03 +0000 (14:46 +0100)]
staging: iio: ad2s1210: remove redundant assignment to variable negative

Variable negative is being assigned a value that is never read, it is
being re-assigned later. The assignment is redundant and can be removed.

Cleans up clang scan build warning:
drivers/staging/iio/resolver/ad2s1210.c:502:3: warning: Value stored
to 'negative' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220418134603.81336-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Replace VNSvInPortB with ioread8
Philipp Hortmann [Sat, 16 Apr 2022 08:00:55 +0000 (10:00 +0200)]
staging: vt6655: Replace VNSvInPortB with ioread8

Replace macro VNSvInPortB with ioread8. Avoid cast of the return
value is possible with one exception.
The name of macro and the arguments use CamelCase which
is not accepted by checkpatch.pl

Since there are more than one checkpatch issue per line,
more steps are rquired to fix.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/fd71797d9d55d53f95c5c4e2df826bf85dd4626a.1650094595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Replace MACvGPIOIn with VNSvInPortB
Philipp Hortmann [Sat, 16 Apr 2022 08:00:50 +0000 (10:00 +0200)]
staging: vt6655: Replace MACvGPIOIn with VNSvInPortB

Replace macro MACvGPIOIn with VNSvInPortB.
Next patch will replace all macros VNSvInPortB with ioread8.
The names of macros and the arguments use CamelCase which
is not accepted by checkpatch.pl

Since there are more than one checkpatch issue per line,
more steps are rquired to fix.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0a3c3eb0d4dad544fa281b34c5a70d4a3ab2d9f1.1650094595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8712: Remove unnecessary int typecast
Solomon Tan [Sun, 17 Apr 2022 16:54:48 +0000 (16:54 +0000)]
staging: rtl8712: Remove unnecessary int typecast

This patch gets rid of the following error from checkpatch.pl:
WARNING: Unnecessary typecast of c90 int constant.

Signed-off-by: Solomon Tan <solomonbstoner@protonmail.ch>
Link: https://lore.kernel.org/r/YlxGTMBsLqdOIrpC@ArchDesktop
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: qlge: add blank line after function declaration
Soumya Negi [Sat, 16 Apr 2022 19:17:45 +0000 (12:17 -0700)]
staging: qlge: add blank line after function declaration

Adhere to linux coding style. Reported by checkpatch:
CHECK: Please use a blank line after function/struct/union/enum declarations

Signed-off-by: Soumya Negi <soumya.negi97@gmail.com>
Link: https://lore.kernel.org/r/20220416191745.7079-1-soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: vt6655: Delete tmacro.h
Philipp Hortmann [Sat, 16 Apr 2022 19:16:22 +0000 (21:16 +0200)]
staging: vt6655: Delete tmacro.h

Relocate the only macro MAKEWORD that is in use and remove file
tmacro.h. File needs to be changed anyhow because of use of CamelCase
which is not accepted by checkpatch.pl. Reduced code provides
a better overview.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20220416191622.GA11596@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: Remove the drivers for the Unisys s-Par
Fabio M. De Francesco [Thu, 14 Apr 2022 10:32:17 +0000 (12:32 +0200)]
staging: Remove the drivers for the Unisys s-Par

The Unisys sub-tree of drivers/staging contains three drivers for the
"Unisys Secure Partition" (s-Par(R)): visorhba, visorinput, visornic.

They have no maintainers, in fact the only one that is listed in
MAINTAINERS has an unreacheable email address. During 2021 and 2022
several patches have been submitted to these drivers but nobody at
Unisys cared of reviewing the changes. Probably, also the
"sparmaintainer" internal list of unisys.com is not anymore read by
interested Unisys' engineers.

Therefore, remove the drivers/staging/unisys directory and delete the
relevant entries in the MAINTAINERS, Kconfig, Makefile files, then
remove also the drivers/visorbus directory which is not anymore needed
(it contained the driver for the virtualized bus for the Unisys s-Par
firmware).

Cc: David Kershner <david.kershner@unisys.com>
Cc: <sparmaintainer@unisys.com>
Cc: Ken Cox <jkc@redhat.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Link: https://lore.kernel.org/r/20220414103217.32058-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use in-kernel ieee80211 header structures
Michael Straube [Mon, 18 Apr 2022 18:09:16 +0000 (20:09 +0200)]
staging: r8188eu: use in-kernel ieee80211 header structures

The structures

rtw_ieee80211_hdr
rtw_ieee80211_hdr_3addr
rtw_ieee80211_hdr_3addr_qos

in drivers/staging/r8188eu/include/ieee80211.h just duplicate the
in-kernel structures from include/linux/ieee80211.h.

ieee80211_hdr
ieee80211_hdr_3addr
ieee80211_qos_hdr

Remove the rtw_ prefixed structures and use the in-kernel versions.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220418180916.11311-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agor8188eu: remove unused urbs from struct xmit_buf
Ivan Safonov [Sun, 17 Apr 2022 16:36:08 +0000 (19:36 +0300)]
r8188eu: remove unused urbs from struct xmit_buf

Driver allocates eighth urbs per xmit_buf, but uses only first urb.
Allocation of seven remaining urbs wastes memory for nothing.

Reviewed-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20220417163608.42917-1-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use ARRAY_SIZE for mlme_sta_tbl
Martin Kaiser [Sun, 17 Apr 2022 10:22:21 +0000 (12:22 +0200)]
staging: r8188eu: use ARRAY_SIZE for mlme_sta_tbl

Use ARRAY_SIZE instead of hard-coding the number of entries in the
mlme_sta_tbl array.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: don't call empty DoReserved function
Martin Kaiser [Sun, 17 Apr 2022 10:22:20 +0000 (12:22 +0200)]
staging: r8188eu: don't call empty DoReserved function

Replace the DoReserved function pointer with NULL in mlme_sta_tbl. We can
skip the function call for reserved subtypes.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: replace mlme_handler with function pointer
Martin Kaiser [Sun, 17 Apr 2022 10:22:19 +0000 (12:22 +0200)]
staging: r8188eu: replace mlme_handler with function pointer

mlme_sta_tbl is an array of struct mlme_handler. mlme_handler's num and
str components are not used. The code in mgt_dispatcher uses the subtype
number of the incoming frame to select the array entry for compiling the
repsonse.

We can remove struct mlme_handler and make mlme_sta_tbl an array of
function pointers.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: the frame type is shifted out
Martin Kaiser [Sun, 17 Apr 2022 10:22:18 +0000 (12:22 +0200)]
staging: r8188eu: the frame type is shifted out

The index calculation in mgt_dispatcher does not use the frame type. The
4-bit right shift ignores protocol version and frame type.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: replace the GetFrameSubType call
Martin Kaiser [Sun, 17 Apr 2022 10:22:17 +0000 (12:22 +0200)]
staging: r8188eu: replace the GetFrameSubType call

The driver's local GetFrameSubType macro returns both frame type and
subtype.

Use the ieee80211 framework to extract the two fields. This shows more
clearly that both type and subtype are read.

Convert everything to host endianness before we use bit operations.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: check receiver address only once
Martin Kaiser [Sun, 17 Apr 2022 10:22:16 +0000 (12:22 +0200)]
staging: r8188eu: check receiver address only once

Check only once in mgt_dispatcher that the receiver address is the local
address or the broadcast address. The second identical check can be
removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220417102221.466524-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: place constants in right side in a comparison
Mahak Gupta [Thu, 14 Apr 2022 23:07:57 +0000 (04:37 +0530)]
staging: r8188eu: place constants in right side in a comparison

reported by checkpatch:

Comparisons should place the constant on the right side of the test.

Fix these warnings.

Signed-off-by: Mahak Gupta <mahak_g@cs.iitr.ac.in>
Link: https://lore.kernel.org/r/20220414230757.19348-1-mahak_g@cs.iitr.ac.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: check firmware header existence before access
Michael Straube [Sun, 17 Apr 2022 17:54:41 +0000 (19:54 +0200)]
staging: r8188eu: check firmware header existence before access

We should access the fields of fwhdr only if the check for firmware
header existence is true. Move the affected code into the if block
that checks firmware header existence.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use pr_info_once() to log the firmware version
Michael Straube [Sun, 17 Apr 2022 17:54:40 +0000 (19:54 +0200)]
staging: r8188eu: use pr_info_once() to log the firmware version

Use pr_info_once() instead of a static variable and an if statement
to log the firmware version only once.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-8-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: remove variables from rtl8188e_firmware_download()
Michael Straube [Sun, 17 Apr 2022 17:54:39 +0000 (19:54 +0200)]
staging: r8188eu: remove variables from rtl8188e_firmware_download()

The local variables fw_version, fw_subversion, fw_signature in
rtl8188e_firmware_download() are only used in one place. Use the
assigned values directly and remove the variables to make the code
shorter and cleaner.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: use sizeof instead of hardcoded firmware header size
Michael Straube [Sun, 17 Apr 2022 17:54:38 +0000 (19:54 +0200)]
staging: r8188eu: use sizeof instead of hardcoded firmware header size

Use sizeof() instead of hardcoding the firmware header size and add
a compile time check to ensure struct rt_firmware_hdr has the correct
size.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-6-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: rename fields of struct rt_firmware_hdr
Michael Straube [Sun, 17 Apr 2022 17:54:37 +0000 (19:54 +0200)]
staging: r8188eu: rename fields of struct rt_firmware_hdr

Rename the fields of struct rt_firmware_hdr to avoid camel case.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: clean up comments in struct rt_firmware_hdr
Michael Straube [Sun, 17 Apr 2022 17:54:36 +0000 (19:54 +0200)]
staging: r8188eu: clean up comments in struct rt_firmware_hdr

Remove unnecessary comments from struct rt_firmware_hdr. While at it
align the in-line comments.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: convert u32 fields of rt_firmware_hdr to __le32
Michael Straube [Sun, 17 Apr 2022 17:54:35 +0000 (19:54 +0200)]
staging: r8188eu: convert u32 fields of rt_firmware_hdr to __le32

Convert the u32 fields of struct rt_firmware_hdr to __le32 for
consistency.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: r8188eu: fix struct rt_firmware_hdr
Michael Straube [Sun, 17 Apr 2022 17:54:34 +0000 (19:54 +0200)]
staging: r8188eu: fix struct rt_firmware_hdr

The size of struct rt_firmware_hdr is 36 bytes.

$ pahole -C rt_firmware_hdr drivers/staging/r8188eu/r8188eu.o
struct rt_firmware_hdr {
        __le16                     Signature;            /*     0     2 */
        u8                         Category;             /*     2     1 */
        u8                         Function;             /*     3     1 */
        __le16                     Version;              /*     4     2 */
        u8                         Subversion;           /*     6     1 */

        /* XXX 1 byte hole, try to pack */

        u16                        Rsvd1;                /*     8     2 */
        u8                         Month;                /*    10     1 */
        u8                         Date;                 /*    11     1 */
        u8                         Hour;                 /*    12     1 */
        u8                         Minute;               /*    13     1 */
        __le16                     RamCodeSize;          /*    14     2 */
        u8                         Foundry;              /*    16     1 */
        u8                         Rsvd2;                /*    17     1 */

        /* XXX 2 bytes hole, try to pack */

        __le32                     SvnIdx;               /*    20     4 */
        u32                        Rsvd3;                /*    24     4 */
        u32                        Rsvd4;                /*    28     4 */
        u32                        Rsvd5;                /*    32     4 */

        /* size: 36, cachelines: 1, members: 17 */
        /* sum members: 33, holes: 2, sum holes: 3 */
        /* last cacheline: 36 bytes */
};

But the header in the firmware file is only 32 bytes long.

The hexdump of rtl8188eufw.bin shows that the field Rsvd1 should be u8
instead of __le16.

OFFSET      rtl8188eufw.bin
-----------------------------------------------------------
0x00000000  E1 88 10 00 0B 00 01 00 01 21 11 27 30 36 00 00
0x00000010  2D 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00

0x00000000  E1 88 10 00 0B 00 01  00     01     21    11    27 30 36 00 00
                              ^   ^      ^      ^     ^     ^
                     Subversion   Rsvd1  Month  Date  Hour  Minute

With the change of field Rsvd1 from __le16 to u8 the structure has the
correct size 32.

$ pahole -C rt_firmware_hdr drivers/staging/r8188eu/r8188eu.o
struct rt_firmware_hdr {
        __le16                     Signature;            /*     0     2 */
        u8                         Category;             /*     2     1 */
        u8                         Function;             /*     3     1 */
        __le16                     Version;              /*     4     2 */
        u8                         Subversion;           /*     6     1 */
        u8                         Rsvd1;                /*     7     1 */
        u8                         Month;                /*     8     1 */
        u8                         Date;                 /*     9     1 */
        u8                         Hour;                 /*    10     1 */
        u8                         Minute;               /*    11     1 */
        __le16                     RamCodeSize;          /*    12     2 */
        u8                         Foundry;              /*    14     1 */
        u8                         Rsvd2;                /*    15     1 */
        __le32                     SvnIdx;               /*    16     4 */
        u32                        Rsvd3;                /*    20     4 */
        u32                        Rsvd4;                /*    24     4 */
        u32                        Rsvd5;                /*    28     4 */

        /* size: 32, cachelines: 1, members: 17 */
        /* last cacheline: 32 bytes */

The wrong size had no effect because the header size is hardcoded to
32 where it is used in the code and the fields after Subversion are
not used.

Fixes: 7884fc0a1473 ("staging: r8188eu: introduce new include dir for RTL8188eu driver")
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220417175441.13830-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: bcm2835-audio: fix mutex definition without comment
Adrien Thierry [Thu, 14 Apr 2022 18:16:22 +0000 (14:16 -0400)]
staging: bcm2835-audio: fix mutex definition without comment

Fix issue reported by checkpatch:

CHECK: struct mutex definition without comment
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835.h:64:

Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20220414181622.102049-6-athierry@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: bcm2835-audio: fix mutex definition without comment
Adrien Thierry [Thu, 14 Apr 2022 18:16:21 +0000 (14:16 -0400)]
staging: bcm2835-audio: fix mutex definition without comment

Fix issue reported by checkpatch:

CHECK: struct mutex definition without comment
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:14:

Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20220414181622.102049-5-athierry@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: bcm2835-audio: fix unnecessary space after cast
Adrien Thierry [Thu, 14 Apr 2022 18:16:20 +0000 (14:16 -0400)]
staging: bcm2835-audio: fix unnecessary space after cast

Fix issue reported by checkpatch:

CHECK: No space is necessary after a cast
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:240:

Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20220414181622.102049-4-athierry@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: bcm2835-audio: fix line ending with '('
Adrien Thierry [Thu, 14 Apr 2022 18:16:19 +0000 (14:16 -0400)]
staging: bcm2835-audio: fix line ending with '('

Fix issue reported by checkpatch:

CHECK: Lines should not end with a '('
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:85:

Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20220414181622.102049-3-athierry@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: bcm2835-audio: fully describe config symbol
Adrien Thierry [Thu, 14 Apr 2022 18:16:18 +0000 (14:16 -0400)]
staging: bcm2835-audio: fully describe config symbol

Explain SND_BCM2835 config option in more detail to fix checkpatch
warning:

WARNING: please write a help paragraph that fully describes the config
symbol
FILE: drivers/staging/vc04_services/bcm2835-audio/Kconfig:2

Signed-off-by: Adrien Thierry <athierry@redhat.com>
Link: https://lore.kernel.org/r/20220414181622.102049-2-athierry@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8192u: make read-only array EWC11NHTCap static const
Colin Ian King [Thu, 14 Apr 2022 10:36:50 +0000 (11:36 +0100)]
staging: rtl8192u: make read-only array EWC11NHTCap static const

Don't populate the read-only array EWC11NHTCap on the stack but instead
make it static const. Also makes the object code a little smaller.
Remove comment.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220414103650.297396-1-colin.i.king@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: ks7010: coding style fix: use tabs for indent
Aliya Rahmani [Wed, 13 Apr 2022 20:46:49 +0000 (02:16 +0530)]
staging: ks7010: coding style fix: use tabs for indent

Added tabs for indent to fix the checkpatch error.

Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com>
Link: https://lore.kernel.org/r/20220413204648.60358-1-aliyarahmani786@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2 years agostaging: rtl8712: Remove unnecessary parentheses
Aliya Rahmani [Wed, 13 Apr 2022 18:23:04 +0000 (23:53 +0530)]
staging: rtl8712: Remove unnecessary parentheses

Remove redundant parentheses reported by checkpatch.

Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com>
Link: https://lore.kernel.org/r/20220413182303.34807-1-aliyarahmani786@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>