Fabio Aiuto
a1b8a9bbce
staging: rtl8723bs: moved contexts for arc4 encryption in struct security_priv
...
moved struct arc4_ctx in struct security_priv to avoid stack allocation
inside encryption routines.
this has been done to fix the following 0-DAY issues:
>> drivers/staging/rtl8723bs/core/rtw_security.c:89:6: warning:
stack frame size of 1120 bytes in function 'rtw_wep_encrypt'
[-Wframe-$
void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
^
>> drivers/staging/rtl8723bs/core/rtw_security.c:145:6:
warning: stack frame size of 1088 bytes in function 'rtw_wep_decrypt'
[-Wframe$
void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
^
>> drivers/staging/rtl8723bs/core/rtw_security.c:514:5:
warning: stack frame size of 1136 bytes in function 'rtw_tkip_encrypt'
[-Wfram$
u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
^
>> drivers/staging/rtl8723bs/core/rtw_security.c:586:5:
warning: stack frame size of 1104 bytes in function 'rtw_tkip_decrypt'
[-Wfram$
u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
^
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com >
Link: https://lore.kernel.org/r/20210521144158.2440-1-fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:23:07 +02:00
Greg Kroah-Hartman
1b4c0f3bbd
staging: rtl8723bs: rename get_ra() due to global symbol collision
...
Turns out that powerpc already has a get_ra() function, which conflicts
with this staging driver's inlined function (which is just picking a
byte out of an array for some odd reason), so rename it to fix the
powerpc build as that's the more important thing here.
Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu >
Link: https://lore.kernel.org/r/20210520064801.1961972-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-20 11:41:28 +02:00
Greg Kroah-Hartman
7ca8d993d0
staging: rtl8723bs: rtl8723b_hal_init.c: fix build warnings about unused variables
...
0-day keeps spitting out annoying messages:
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3895:18: warning: variable 'ra_info2' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3895:8: warning: variable 'ra_info1' set but not used [-Wunused-but-set-variable]
Oddly, it's not catching all of the "set but not used" variables in this
switch statement. Fix it up just removing the storage of the values
read. Leave the read from the hardware as odds are it is required in
order to keep it working properly as I do not have the hardware to test
with.
I bet the whole case can be removed, but that will have to wait until
later...
Link: https://lore.kernel.org/r/20210520064144.1953251-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-20 11:41:20 +02:00
Greg Kroah-Hartman
d23dc8cd13
staging: rtl8723bs: HalBtc8723b1Ant.c: fix build warnings about unused variables
...
0-day keeps spitting out annoying messages:
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2117:6: warning: variable 'u4Tmp' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:17: warning: variable 'u1Tmpb' set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2118:5: warning: variable 'u1Tmpa' set but not used [-Wunused-but-set-variable]
So fix this up by just removing the storage of the values read. Leave
the read from the hardware as odds are it is required in order to keep
it working properly as I do not have the hardware to test with.
Link: https://lore.kernel.org/r/20210520064133.1953156-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-20 11:41:13 +02:00
Philippe Dixon
62d7ecaf56
staging: greybus: spi: add blank line after variable declaration
...
This patch fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations
Reviewed-by: Alex Elder <elder@linaro.org >
Acked-by: Viresh Kumar <viresh.kumar@linaro.org >
Signed-off-by: Philippe Dixon <philippesdixon@gmail.com >
Link: https://lore.kernel.org/r/20210519193938.GA7131@ubuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-20 11:40:36 +02:00
F.A.Sulaiman
5d4f6b9e20
Staging: greybus: fix open parenthesis error in gbphy.c
...
This patch fix "Alignment should match open parenthesis" checkpatch error.
Acked-by: Alex Elder <elder@linaro.org >
Signed-off-by: "F.A.Sulaiman" <asha.16@itfac.mrt.ac.lk >
Link: https://lore.kernel.org/r/20210519181938.30813-1-asha.16@itfac.mrt.ac.lk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-20 11:40:33 +02:00
Dan Carpenter
ede4ac7b67
staging: emxx_udc: fix loop in _nbu2ss_nuke()
...
The _nbu2ss_ep_done() function calls:
list_del_init(&req->queue);
which means that the loop will never exit.
Fixes: ca3d253eb9 ("Staging: emxx_udc: Iterate list using list_for_each_entry")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/YKUd0sDyjm/lkJfJ@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-20 11:40:15 +02:00
Rajat Asthana
9a032e3f7e
staging: greybus: audio: Fix sparse warning.
...
Sparse complains that:
warning: restricted send_ctl_elem_iface_t degrades to integer.
I have looked at this code, and the code is fine as-is. Normally we
would frown on using the __force directive to silence Sparse warnings
but in this case it's fine. Case statements can't be made into __bitwise
types. We also can't change the type of "ctl->iface" either because that
is part of the user space API.
So just add a (__force int) to make the warning go away.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Rajat Asthana <thisisrast7@gmail.com >
Link: https://lore.kernel.org/r/20210519134119.848055-1-thisisrast7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-20 11:39:26 +02:00
Bixuan Cui
b9f38e913a
staging: comedi: Remove unused variable ‘min_full_scale’ and function 'get_min_full_scales'
...
The variable ‘min_full_scale’ and function 'get_min_full_scales' are
not used, So delete them.
Reviewed-by: Ian Abbott <abbotti@mev.co.uk >
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com >
Link: https://lore.kernel.org/r/20210514085214.53941-1-cuibixuan@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 18:00:24 +02:00
Bryan Brattlof
403e6946d1
staging: rtl8723bs: remove if (true) statement
...
'if (true) { ... }' will always evaluate to true. Remove it and
save a few tabs for somewhere else.
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/20210518144335.1677320-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 18:00:10 +02:00
Wang Qing
946c945301
staging: rtl8192e: delete extra blank lines
...
fixing CHECK:Blank lines aren't necessary before a close brace '}'
Signed-off-by: Wang Qing <wangqing@vivo.com >
Link: https://lore.kernel.org/r/1621393219-28665-1-git-send-email-wangqing@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:59:39 +02:00
Wang Qing
9b0644fc43
staging: iio: fix some formatting issues
...
fixing:
CHECK: Alignment should match open parenthesis
#1351 : FILE: drivers/staging/iio/addac/adt7316.c:1351:
CHECK: Alignment should match open parenthesis
#1378 : FILE: drivers/staging/iio/addac/adt7316.c:1378:
Signed-off-by: Wang Qing <wangqing@vivo.com >
Link: https://lore.kernel.org/r/1621389170-5850-1-git-send-email-wangqing@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:59:29 +02:00
Jiabing Wan
6f8ef16019
staging: vc04_services: fix a whitespace coding style issue
...
Fixing the following checkpatch warning:
WARNING: please, no spaces at the start of a line
Signed-off-by: Jiabing Wan <kael_w@yeah.net >
Link: https://lore.kernel.org/r/20210518121735.88767-1-wanjiabing@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:59:00 +02:00
Bryan Brattlof
73861d26a5
staging: rtl8723bs: remove _rtw_sd_f0_read8()
...
Both the _rtw_sd_f0_read8() function and the rtw_sd_f0_read8()
redefinition are used anywhere in the driver and can be removed.
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/5f025724ea7149e6ff11f94352b3321833f9bcaf.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:36 +02:00
Bryan Brattlof
3bdc1bc67e
staging: rtl8723bs: remove duplicate name for _rtw_write_port()
...
_rtw_write_port() is being redefined as rtw_write_port(). Because
rtw_write_port() is the only name used in the driver, remove the
duplicate definition and rename the function from _rtw_write_port()
to rtw_write_port()
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/5b8543127a774ca65595588711c05cce28b17bf6.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:35 +02:00
Bryan Brattlof
4d6bfc6f62
staging: rtl8723bs: remove duplicate names for _rtw_write32()
...
_rtw_write32() is redefined as rtw_write32() and
PlatformEFIOWrite4Byte(). Because rtw_write32() is the only name used in
the driver, remove the duplicate definitions and rename the function
from _rtw_write32() to rtw_write32()
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/43917aee34e85139e613578cf6f14938211c8835.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:35 +02:00
Bryan Brattlof
1c42d72e47
staging: rtl8723bs: remove duplicate names for _rtw_write16()
...
_rtw_write16() is redefined as rtw_write16() and
PlatformEFIOWrite2Byte(). Because rtw_write16() is the only name used in
the driver, remove the duplicate definitions and rename the function
from _rtw_write16() to rtw_write16()
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/7d53fb295f67f01c72640045afb88150391bce35.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:35 +02:00
Bryan Brattlof
7f06caf9a4
staging: rtl8723bs: remove duplicate names for _rtw_write8()
...
_rtw_write8() is redefined as rtw_write8() and PlatformEFIOWrite1Byte().
Because rtw_write8() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_write8() to
rtw_write8()
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/35ffc9cd5af7009b317361033a6ca5263307d61a.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:35 +02:00
Bryan Brattlof
16b1b3c822
staging: rtl8723bs: remove duplicate names for _rtw_read32()
...
_rtw_read32() is redefined as rtw_read32() and PlatformEFIORead4Byte().
Because rtw_read32() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_read32() to
rtw_read32()
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/15956707341f76de683245c392063b8121a805ea.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:35 +02:00
Bryan Brattlof
8ff74e4307
staging: rtl8723bs: remove duplicate names for _rtw_read16()
...
_rtw_read16() is redefined as rtw_read16() and PlatformEFIORead2Byte().
Because rtw_read16() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_read16() to
rtw_read16()
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/11458342572f21d9df58b3969ad1f16fdff157f4.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:35 +02:00
Bryan Brattlof
51d4aa6d6b
staging: rtl8723bs: remove duplicate names for _rtw_read8()
...
_rtw_read8() is redefined as rtw_read8() and PlatformEFIORead1Byte().
Because rtw_read8() is the only name used in the driver, remove the
duplicate definitions and rename the function from _rtw_read8() to
rtw_read8()
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/9880c86c2aad7d95a714d8b03b28b83634f98c1e.1621361919.git-series.hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:58:35 +02:00
Stefan Wahren
286bc9f48c
staging: vchiq_core: introduce defines for retry_poll
...
Use descriptive defines instead of a number with a comment.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621106030-30363-1-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:45 +02:00
Stefan Wahren
5c56a4485c
staging: vchiq_core: introduce defines for close_recvd
...
Use descriptive defines instead of a number with a comment.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-20-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:32 +02:00
Stefan Wahren
4c51210461
staging: vchiq_core: introduce parse_message
...
The function parse_rx_slots is very longer. So move at least the message
parsing into a separate function to improve readability. In good case
the function returns the message payload length which is necessary to
move to the next message.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-19-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:32 +02:00
Stefan Wahren
1a64ab341d
staging: vchiq_arm: Avoid unnecessary line breaks
...
There are a few statements which are unnecessary broken into multiple lines.
Let's join them into a single line to improve readability.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-18-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:32 +02:00
Stefan Wahren
e39ff0e4ea
staging: vchiq_arm: make vchiq_shutdown_internal return void
...
The function vchiq_shutdown_internal always returns VCHIQ_SUCCESS. So change
the return type to void and simplify the logic in vchiq_shutdown.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-17-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:32 +02:00
Stefan Wahren
1d702f5962
staging: vchiq_core: fix comment in vchiq_shutdown_internal
...
The comment seems to be copied from vchiq_connect_internal(). So change
it to match the actual behavior.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-16-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:32 +02:00
Stefan Wahren
ed720b2bfa
staging: vchiq_core: reduce indention in release_service_messages
...
It's possible to convert the if statement into a continue early and
save an indention level.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-15-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:32 +02:00
Stefan Wahren
7040e9d7b7
staging: vchiq_arm: re-arrange function header
...
This makes the function headers look more consistent.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-14-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
f299b34ef2
staging: vchiq_arm: add blank line after declarations
...
Improve the readability by add a blank line after declarations. This
was found with checkpatch.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-13-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
fd3e03d71f
staging: vchiq_arm: drop non-beneficial comments
...
Those comments doesn't provide any benefit, so drop them.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-12-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
a140f3a02a
staging: vchiq_arm: Prefer kzalloc(sizeof(*waiter)...)
...
It's shorter and easier to maintain. This has been found with checkpatch.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-11-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
618150c125
staging: vchiq_arm: drop ftrace-like logging
...
This addresses the warnings reported by checkpatch:
WARNING: Unnecessary ftrace-like logging - prefer using ftrace
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-10-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
022b5a3cd8
staging: vchiq_arm: Use define for doorbell irq
...
The interrupt handler uses a magic number to check that the doorbell
was rung. Better replace this number with official Broadcom define.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-9-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
2f440843a7
staging: vchiq_core: avoid indention in poll_services_of_group
...
By converting the first and the third if statement into continue early
the function poll_services_of_group() can avoid 2 indention levels.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-8-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
20ebcf0bf1
staging: vchiq_core: introduce poll_services_of_group
...
The function poll_services() has too many indention levels. So keep only
the group iteration loop and move the rest into a new function
poll_services_of_group().
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-7-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
0705a939c2
staging: vchiq_arm: balance braces for if-else statements
...
This fixes the following checkpatch notices in vchiq_arm:
CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-6-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
8ba5f91bab
staging: vc04_services: remove __VCCOREVER__
...
This define isn't used anymore. Let's remove it.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-5-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
21711c7ee1
staging: vchiq_core: separate postfix increment
...
Postfix increment within a complexer statement doesn't improve readability.
So separate them.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-4-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
63e24ae26f
staging: vchiq_core: drop unnecessary release_count
...
There is no benefit of the variable release_count, so drop it.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-3-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:31 +02:00
Stefan Wahren
1c82975b5f
staging: vchiq_core: fix return type of vchiq_init_state
...
Recent commit "staging: vchiq_core: drop vchiq_status from vchiq_init_state"
missed to change the return type in the definition. Let's fix this now.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621105859-30215-2-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:56:30 +02:00
Martin Kaiser
af39f935c1
staging: rtl8188eu: use safe iterator in rtw_free_xmitframe_queue
...
Use list_for_each_entry_safe, we may delete list items while iterating
over the list.
Fixes: 23017c8842 ("staging: rtl8188eu: Use list iterators and helpers")
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20210517201826.25150-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:54:51 +02:00
Martin Kaiser
2253748164
staging: rtl8188eu: use safe iterator in rtw_sta_flush
...
Use list_for_each_entry_safe, we may delete list items while iterating
over the list.
Fixes: 23017c8842 ("staging: rtl8188eu: Use list iterators and helpers")
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20210517201826.25150-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:54:51 +02:00
Martin Kaiser
b0f2044c61
staging: rtl8188eu: use safe iterator in rtw_acl_remove_sta
...
Use list_for_each_entry_safe, we may delete list items while iterating
over the list.
Fixes: 23017c8842 ("staging: rtl8188eu: Use list iterators and helpers")
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20210517201826.25150-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:54:51 +02:00
Martin Kaiser
39b19c63a3
staging: rtl8188eu: use safe iterator in expire_timeout_chk
...
In the first loop in expire_timeout_chk, we may call rtw_free_stainfo and
remove an entry from auth_list.
In the second loop, we may call list_del_init on our list.
Use list_for_each_entry_safe for both loops.
Fixes: 23017c8842 ("staging: rtl8188eu: Use list iterators and helpers")
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20210517201826.25150-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:54:51 +02:00
Martin Kaiser
565a45a1c3
staging: rtl8188eu: use safe iterator in rtw_free_all_stainfo
...
This is another case where we may remove list entries while we iterate over
the list. Use list_for_each_entry_safe to avoid an endless loop.
Fixes: 23017c8842 ("staging: rtl8188eu: Use list iterators and helpers")
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20210517201826.25150-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:54:50 +02:00
Martin Kaiser
d5af74ead2
staging: rtl8188eu: use safe iterator in rtw_free_network_queue
...
rtw_free_network_queue iterates over the scanned wireless networks and
calls _rtw_free_network for each of them. In some cases,
_rtw_free_network removes a network from the list.
We have to use list_for_each_entry_safe if we remove list entries while
we iterate over a list.
Fixes: 23017c8842 ("staging: rtl8188eu: Use list iterators and helpers")
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Link: https://lore.kernel.org/r/20210517201826.25150-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:54:50 +02:00
Desmond Cheong Zhi Xi
0c21b72a7f
Staging: rtl8723bs: remove dead code in HalBtc8723b1Ant.c
...
This commit removes dead code to resolve the following checkpatch.pl
warning:
WARNING: Block comments use * on subsequent lines
+ /*
+ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x ", "Latest error condition(should be 0)", \
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com >
Link: https://lore.kernel.org/r/20210518044119.2960494-8-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
f7d21f444a
Staging: rtl8723bs: fix line continuations in HalBtc8723b1Ant.c
...
In addition to removing line continuations, the indentation of some
lines were fixed. This was done to avoid the introduction of new
warnings because removing the line continuations caused checkpatch.pl
to emit "CHECK: Alignment should match open parenthesis".
This commit fixes the following checkpatch.pl warnings:
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d/ %d", "Ant PG Num/ Ant Mech/ Ant Pos:", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %s / %d", "BT stack/ hci ext ver", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d_%x/ 0x%x/ 0x%x(%d)", "CoexVer/ FwVer/ PatchVer", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d / %d(%d)", "Dot11 channel / HsChnl(HsMode)", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %02x %02x %02x ", "H2C Wifi inform bt chnl Info", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d", "Wifi rssi/ HS rssi", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d/ %d/ %s", "Wifi bLink/ bRoam/ bScan/ bHi-Pri", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %s / %s/ %s/ AP =%d/ %s ", "Wifi status", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d/ %d/ %d/ %d", "sta/vwifi/hs/p2pGo/p2pGc", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = [%s/ %d/ %d/ %d] ", "BT [status/ rssi/ retryCnt/ popCnt]", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d / %d / %d / %d", "SCO/HID/PAN/A2DP", \
WARNING: Avoid unnecessary line continuations
+ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %s", "BT Role", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %s", "BT Info A2DP rate", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %02x %02x %02x %02x %02x %02x %02x(%d)", GLBtInfoSrc8723b1Ant[i], \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %s/%s, (0x%x/0x%x)", "PS state, IPS/LPS, (lps/rpwm)", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d", "SM[LowPenaltyRA]", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %s/ %s/ %d ", "DelBA/ BtCtrlAgg/ AggSize", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x ", "Rate Mask", \
WARNING: Avoid unnecessary line continuations
+ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %02x %02x %02x %02x %02x case-%d (auto:%d)", "PS TDMA", \
WARNING: Avoid unnecessary line continuations
+ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "Coex Table Type", \
WARNING: Avoid unnecessary line continuations
+ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = %d", "IgnWlanAct", \
WARNING: Avoid unnecessary line continuations
+ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "backup ARFR1/ARFR2/RL/AMaxTime", \
WARNING: Avoid unnecessary line continuations
+ CL_SPRINTF(cliBuf, BT_TMP_BUF_SIZE, "\r\n %-35s = 0x%x/0x%x/0x%x/0x%x", "0x430/0x434/0x42a/0x456", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x778/0x6cc/0x880[29:25]", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x948/ 0x67[5] / 0x764 / 0x76e", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x92c[1:0]/ 0x930[7:0]/0x944[1:0]", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x/ 0x%x/ 0x%x", "0x38[11]/0x40/0x4c[24:23]/0x64[0]", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x", "0x550(bcn ctrl)/0x522", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x", "0xc50(dig)/0x49c(null-drop)", \
WARNING: Avoid unnecessary line continuations
+ (u4Tmp[1] & 0xffff) + (u4Tmp[2] & 0xffff) + \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "OFDM-CCA/OFDM-FA/CCK-FA", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d/ %d/ %d", "CRC_OK CCK/11g/11n/11n-Agg", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d/ %d/ %d", "CRC_Err CCK/11g/11n/11n-Agg", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = 0x%x/ 0x%x/ 0x%x", "0x6c0/0x6c4/0x6c8(coexTable)", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d", "0x770(high-pri rx/tx)", \
WARNING: Avoid unnecessary line continuations
+ "\r\n %-35s = %d/ %d", "0x774(low-pri rx/tx)", \
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com >
Link: https://lore.kernel.org/r/20210518044119.2960494-7-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:50:55 +02:00
Desmond Cheong Zhi Xi
557c232536
Staging: rtl8723bs: add missing blank line in HalBtc8723b1Ant.c
...
This commit fixes the following checkpatch.pl warning:
WARNING: Missing a blank line after declarations
+ struct btc_bt_link_info *pBtLinkInfo = &pBtCoexist->btLinkInfo;
+ halbtc8723b1ant_BtRssiState(2, 28, 0);
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Desmond Cheong Zhi Xi <desmondcheongzx@gmail.com >
Link: https://lore.kernel.org/r/20210518044119.2960494-6-desmondcheongzx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-19 17:50:55 +02:00