aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2021-05-23media: uapi: mpeg2: Remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMSEzequiel Garcia7-29/+4
The Hantro and Cedrus drivers work in frame-mode, meaning they expect all the slices in a picture (either frame or field structure) to be passed in each OUTPUT buffer. These two are the only V4L2 MPEG-2 stateless decoders currently supported. Given the VA-API drivers also work per-frame, coalescing all the MPEG-2 slices in a buffer before the decoding operation, it makes sense to not expect slice-mode drivers and therefore remove V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS. This is done to avoid carrying an unused interface. If needed, this control can be added without breaking backwards compatibility. Note that this would mean introducing a enumerator control to specify the decoding mode (see V4L2_CID_STATELESS_H264_DECODE_MODE). Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Co-developed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-23media: hantro/cedrus: Remove unneeded slice size and slice offsetEzequiel Garcia3-8/+7
The MPEG2_SLICE_PARAMS control is designed to refer to a single slice. However, the Hantro and Cedrus drivers operate in per-frame mode, and so does the current Ffmpeg and GStreamer implementations that are tested with these two drivers. In other words, the drivers are expecting all the slices in a picture (with either frame or field structure) to be contained in the OUTPUT buffer, which means the slice size and offset shouldn't be used. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-23media: uapi: mpeg2: Move reference buffer fieldsEzequiel Garcia3-10/+6
The forward and backwards references are specified per-picture and not per-slice. Move it to V4L2_CID_MPEG_VIDEO_MPEG2_PICTURE. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-23media: uapi: mpeg2: Split sequence and picture parametersEzequiel Garcia7-16/+48
Typically, bitstreams are composed of a sequence header, followed by a number of picture header and picture coding extension headers. Each picture can be composed of a number of slices. Let's split the MPEG-2 uAPI to follow these semantics more closely, allowing more usage flexibility. Having these controls split up allows applications to set a sequence control at the beginning of a sequence, and then set a picture control for each frame. While here add padding fields where needed, and document the uAPI header thoroughly. Note that the V4L2_CTRL_TYPE_{} defines had to be moved because it clashes with existing ones. This is not really an issue since they will be re-defined when the controls are moved out of staging. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-23media: uapi: mpeg2: Cleanup flagsEzequiel Garcia3-99/+91
Our current MPEG-2 uAPI uses 1-byte fields for MPEG-2 boolean syntax elements. Clean these by adding a 'flags' field and flag macro for each boolean syntax element. A follow-up change will refactor this uAPI so we don't need to add padding fields just yet. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-23media: uapi: mpeg2: rework quantisation matrices semanticsEzequiel Garcia1-36/+2
As stated in the MPEG-2 specification, section 6.3.7 "Quant matrix extension": Each quantisation matrix has a default set of values. When a sequence_header_code is decoded all matrices shall be reset to their default values. User defined matrices may be downloaded and this can occur in a sequence_header() or in a quant_matrix_extension(). The load_intra_quantiser_matrix syntax elements are transmitted in the bitstream headers, signalling that a quantisation matrix needs to be loaded and used for pictures transmitted afterwards (until the matrices are reset). This "load" semantics are implemented in the V4L2 interface without the need of any "load" flags: passing the control is effectively a load. Therefore, rework the V4L2_CID_MPEG_VIDEO_MPEG2_QUANTISATION semantics to match the MPEG-2 semantics. Quantisation matrices values are now initialized by the V4L2 control core to their reset default value, and applications are expected to reset their values as specified. The quantisation control is therefore optional, and used to load bitstream-defined values in the quantisation matrices. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Co-developed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-23media: uapi: mpeg2: Rename "quantization" to "quantisation"Ezequiel Garcia9-37/+32
The MPEG-2 specification refers to the quantisation matrices using the word "quantisation". Make the V4L2 interface more ergonomic by matching the MPEG-2 spec. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-22Merge tag 'iio-fixes-5.13b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linusGreg Kroah-Hartman1-1/+0
Jonathan writes: Second set of IIO fixes for the 5.13 cycle A mixed bag of fixes for various drivers. Changes since take 1: Fixed a ; in a tag. adi,ad7124 - Fix miss balanced regulator enable / disable in error path - Fix potential overflow with non sequential channel numbers from dt. adi,ad7192 - Avoid disabling clock that was never enabled in error path + remove - Avoid nasty corner case if regulator voltage is 0 that would result in a good return half way through probe. adi,ad7746 - Avoid overwriting num_channels just after setting it correctly. adi,ad7768 - Buffer passed to iio_push_to_buffers_with_timestamp() too small and not aligned appropriately. adi,ad7793 - Missing return code setting in an error path. adi,ad7923 - Buffer too small after support for more channels added. adi,ad5770r - Missing fwnode_handle_put in error paths. fsl,fxa21002c - Missing runtime pm put in error path. * tag 'iio-fixes-5.13b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: ad7793: Add missing error code in ad7793_setup() iio: adc: ad7923: Fix undersized rx buffer. iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp() iio: dac: ad5770r: Put fwnode in error case during ->probe() iio: gyro: fxas21002c: balance runtime power in error path staging: iio: cdc: ad7746: avoid overwrite of num_channels iio: adc: ad7192: handle regulator voltage error first iio: adc: ad7192: Avoid disabling a clock that was never enabled. iio: adc: ad7124: Fix potential overflow due to non sequential channel numbers iio: adc: ad7124: Fix missbalanced regulator enable / disable on error.
2021-05-20staging: emxx_udc: fix loop in _nbu2ss_nuke()Dan Carpenter1-2/+2
The _nbu2ss_ep_done() function calls: list_del_init(&req->queue); which means that the loop will never exit. Fixes: ca3d253eb967 ("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-20media: hantro: use pm_runtime_resume_and_get()Mauro Carvalho Chehab1-4/+2
Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added pm_runtime_resume_and_get() in order to automatically handle dev->power.usage_count decrement on errors. While there's nothing wrong with the current usage on this driver, as we're getting rid of the pm_runtime_get_sync() call all over the media subsystem, let's remove the last occurrence on this driver. Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-05-20staging: rtl8723bs: rename get_ra() due to global symbol collisionGreg Kroah-Hartman2-2/+2
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-20staging: rtl8723bs: rtl8723b_hal_init.c: fix build warnings about unused variablesGreg Kroah-Hartman1-8/+5
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-20staging: rtl8723bs: HalBtc8723b1Ant.c: fix build warnings about unused variablesGreg Kroah-Hartman1-6/+3
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-20staging: greybus: spi: add blank line after variable declarationPhilippe Dixon1-0/+1
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-20Staging: greybus: fix open parenthesis error in gbphy.cF.A.Sulaiman1-2/+2
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-20staging: emxx_udc: fix loop in _nbu2ss_nuke()Dan Carpenter1-2/+2
The _nbu2ss_ep_done() function calls: list_del_init(&req->queue); which means that the loop will never exit. Fixes: ca3d253eb967 ("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-20staging: greybus: audio: Fix sparse warning.Rajat Asthana1-2/+2
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-19staging: mt7621-dts: enable MT7530 interrupt controllerDENG Qingfang1-0/+4
Enable MT7530 interrupt controller in the MT7621 SoC. Signed-off-by: DENG Qingfang <dqfext@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-05-19staging: rtl8723bs: remove if (true) statementBryan Brattlof1-80/+77
'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-19staging: rtl8192e: delete extra blank linesWang Qing1-5/+0
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-19staging: iio: fix some formatting issuesWang Qing1-6/+6
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-19staging: vc04_services: fix a whitespace coding style issueJiabing Wan1-1/+1
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-19staging: rtl8723bs: remove _rtw_sd_f0_read8()Bryan Brattlof2-23/+0
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-19staging: rtl8723bs: remove duplicate name for _rtw_write_port()Bryan Brattlof2-4/+2
_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-19staging: rtl8723bs: remove duplicate names for _rtw_write32()Bryan Brattlof2-7/+2
_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-19staging: rtl8723bs: remove duplicate names for _rtw_write16()Bryan Brattlof2-5/+2
_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-19staging: rtl8723bs: remove duplicate names for _rtw_write8()Bryan Brattlof2-5/+2
_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-19staging: rtl8723bs: remove duplicate names for _rtw_read32()Bryan Brattlof2-7/+2
_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-19staging: rtl8723bs: remove duplicate names for _rtw_read16()Bryan Brattlof2-5/+2
_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-19staging: rtl8723bs: remove duplicate names for _rtw_read8()Bryan Brattlof2-5/+2
_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-19staging: vchiq_core: introduce defines for retry_pollStefan Wahren1-7/+8
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-19staging: vchiq_core: introduce defines for close_recvdStefan Wahren1-7/+8
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-19staging: vchiq_core: introduce parse_messageStefan Wahren1-290/+311
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-19staging: vchiq_arm: Avoid unnecessary line breaksStefan Wahren2-20/+10
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-19staging: vchiq_arm: make vchiq_shutdown_internal return voidStefan Wahren3-18/+13
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-19staging: vchiq_core: fix comment in vchiq_shutdown_internalStefan Wahren1-1/+1
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-19staging: vchiq_core: reduce indention in release_service_messagesStefan Wahren1-32/+33
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-19staging: vchiq_arm: re-arrange function headerStefan Wahren1-23/+18
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-19staging: vchiq_arm: add blank line after declarationsStefan Wahren2-0/+4
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-19staging: vchiq_arm: drop non-beneficial commentsStefan Wahren3-68/+0
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-19staging: vchiq_arm: Prefer kzalloc(sizeof(*waiter)...)Stefan Wahren1-3/+2
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-19staging: vchiq_arm: drop ftrace-like loggingStefan Wahren1-22/+0
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-19staging: vchiq_arm: Use define for doorbell irqStefan Wahren1-1/+3
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-19staging: vchiq_core: avoid indention in poll_services_of_groupStefan Wahren1-49/+44
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-19staging: vchiq_core: introduce poll_services_of_groupStefan Wahren1-57/+62
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-19staging: vchiq_arm: balance braces for if-else statementsStefan Wahren2-21/+32
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-19staging: vc04_services: remove __VCCOREVER__Stefan Wahren1-1/+1
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-19staging: vchiq_core: separate postfix incrementStefan Wahren1-6/+10
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-19staging: vchiq_core: drop unnecessary release_countStefan Wahren1-4/+2
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-19staging: vchiq_core: fix return type of vchiq_init_stateStefan Wahren1-1/+1
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>