Piyush Thange
cb293e6b83
staging: rtl8192u: Fixed warnings of coding style
...
Fixed coding style issues with comments.
Signed-off-by: Piyush Thange <pthange19@gmail.com >
Link: https://lore.kernel.org/r/20210526172900.56093-1-pthange19@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 13:01:04 +02:00
Dave Stevenson
afc023da53
staging: mmal-vchiq: Fix incorrect static vchiq_instance.
...
For some reason lost in history function vchiq_mmal_init used
a static variable for storing the vchiq_instance.
This value is retrieved from vchiq per instance, so worked fine
until you try to call vchiq_mmal_init multiple times concurrently
when things then go wrong. This seemed to happen quite frequently
if using the cutdown firmware (no MMAL or VCSM services running)
as the vchiq_connect then failed, and one or other vchiq_shutdown
was working on an invalid handle.
Remove the static so that each caller gets a unique vchiq_instance.
Fixes: 7b3ad5abf0 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com >
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com >
Link: https://lore.kernel.org/r/1621979857-26754-1-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 12:59:57 +02:00
Phillip Potter
7f8d698ffb
staging: rtl8188eu: convert pr_info call to dev_err call ODM_RAStateCheck
...
Introduce logic to extract struct device pointer from passed in struct
odm_dm_struct pointer argument, and use this to call dev_err instead of
pr_info. As this is an error state if this line is reached, this is not
just information. Also, this is a driver, so dev_err is more
appropriate.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210525214813.6362-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 12:31:07 +02:00
Donggyu Kim
993b21a046
Staging: rtl8723bs: fixed a blank coding style
...
Fixed a coding style issue - add blank after declation
Signed-off-by: Dongkyu Kim <a29661498@gmail.com >
Link: https://lore.kernel.org/r/20210525140123.15100-1-a29661498@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-27 12:30:22 +02:00
Harold Mertzweiller
21e4614b2f
staging: emxx_udc: fix alignment issues
...
Three function calls can now be properly formatted inside the 100
characters limit.
Signed-off-by: Harold Mertzweiller <harold@mrtz.fr >
Link: https://lore.kernel.org/r/20210524152128.20519-1-harold@mrtz.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:25:52 +02:00
Bryan Brattlof
b67decf85f
staging: rtl8723bs: remove sd_f0_read8()
...
The sd_f0_read8() function, which is used by the sdio_f0_read8()
function, are not used anywhere in the driver and both can be
safely removed.
Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com >
Link: https://lore.kernel.org/r/20210524195144.1943280-1-hello@bryanbrattlof.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:25:52 +02:00
Phillip Potter
a75d6a3279
staging: rtl8188eu: remove ASSERT and ODM_RT_ASSERT macros
...
Remove the ASSERT and ODM_RT_ASSERT macros from include/odm_debug.h
as they are unnecessary.
ASSERT does nothing, compiling to a single empty statement.
ODM_RT_ASSERT is used in only one place, in the ODM_RAStateCheck
function with hal/odm.c - it seems to have been intended as an
assertion of some kind, but given it is always called with false
here, there is little point in it not just being a pr_info() call.
Also, the lines relating to the file, function and line number are
not needed as the pr_info() with the function name and error message
is sufficient should anyone wish to track down this error at a source
level, within what is currently a relatively small function.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20210524224532.1230-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:25:52 +02:00
Shreyansh Chouhan
85487bd721
staging: rtl8723bs: fix suspect indents
...
Removed extra spaces and indents from core/rtw_wlan_util.c.
Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com >
Link: https://lore.kernel.org/r/20210524135105.5550-4-chouhan.shreyansh630@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:25:21 +02:00
Shreyansh Chouhan
8f5193f828
staging: rtl8723bs: remove unnecessary braces from conditionals
...
Removed the braces from if else statements in core/rtw_wlan_util.c since
the previous commit (6a257dd6de516573) caused all conditional blocks to
have a single statement in the function check_assoc_AP.
Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com >
Link: https://lore.kernel.org/r/20210524135105.5550-3-chouhan.shreyansh630@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:25:21 +02:00
Shreyansh Chouhan
3c8c577fd2
staging: rtl8723bs: refactor to reduce indents
...
Reduce the number of indents in rtw_wlan_util.c file by refactoring the
code.
Moved the part of code that rearranged ac paramaters in the function
WMMOnAssocResp to a separate function named sort_wmm_ac_params. It takes
both the array of ac params and their indexes as arguments and sorts them.
Has return type void.
Moved the part of code that checked IE for realtek vendor in the
function check_assoc_AP to a separate function named
get_realtek_assoc_AP_vender. It takes a struct ndis_80211_var_ie * as an
argument and returns u32 realtek vendor.
Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh630@gmail.com >
Link: https://lore.kernel.org/r/20210524135105.5550-2-chouhan.shreyansh630@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:25:21 +02:00
Fabio M. De Francesco
f57e6d91a8
staging: rtl8723bs: core: rtw_mlme_ext.c: Remove set but unused variable
...
Removed set but unused 'reason_code' variable. Issue detected by GCC
running with the warning option -Wunused-but-set-variable.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com >
Link: https://lore.kernel.org/r/20210524113433.25923-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:24:28 +02:00
Fabio M. De Francesco
db52e8f480
staging: rtl8723bs: hal: Remove set but unused variables
...
Removed set but unused variables. Issue detected by GCC running with
the warning option -Wunused-but-set-variable. Removed the storage of
the values returned but left the reads because it is possible
that removing them can prevent the hardware from working properly.
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com >
Link: https://lore.kernel.org/r/20210523174547.20646-1-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:24:09 +02:00
Thomas Bracht Laumann Jespersen
6ec070e872
staging: rtl8192e: Fix shadowed variable name
...
Fixes the following sparse warning:
drivers/staging/rtl8192e/rtllib_tx.c:884:32: warning: symbol 'tcb_desc' shadows an earlier one
drivers/staging/rtl8192e/rtllib_tx.c:569:24: originally declared here
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz >
Link: https://lore.kernel.org/r/20210521193711.5457-1-t@laumann.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:23:32 +02:00
Hriday Hegde
939ef16943
staging: rtl8712: Removed unnecessary blank lines
...
Following lines were fixed as dictated by running checkpatch
CHECK: Please don't use multiple blank lines
65: FILE: drivers/staging/rtl8712/xmit_linux.c:65:
+
CHECK: Blank lines aren't necessary after an open brace '{'
39: FILE: drivers/staging/rtl8712/usb_intf.c:39:
+static const struct usb_device_id rtl871x_usb_id_tbl[] = {
CHECK: Blank lines aren't necessary after an open brace '{'
849: FILE: drivers/staging/rtl8712/rtl871x_xmit.c:849:
+{
CHECK: Please don't use multiple blank lines
260: FILE: drivers/staging/rtl8712/rtl871x_sta_mgt.c:260:
+
Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com >
Link: https://lore.kernel.org/r/20210521153924.22843-1-hridayhegde1999@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-05-25 18:23:26 +02:00
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