aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services
diff options
context:
space:
mode:
authorStefan Wahren <stefan.wahren@i2se.com>2021-06-03 17:49:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-04 15:10:02 +0200
commit447fbc14f4166c70a088ad2fc858fe7ca23aee88 (patch)
treec8b605f0c8781dcfac0de5852e9e80fe070ef2e3 /drivers/staging/vc04_services
parentstaging: mt7621-dts: review pcie overlay in 'gbpc1' dts file (diff)
downloadlinux-dev-447fbc14f4166c70a088ad2fc858fe7ca23aee88.tar.xz
linux-dev-447fbc14f4166c70a088ad2fc858fe7ca23aee88.zip
staging: vchiq_core: fix logic in poll_services_of_group
Commit "staging: vchiq_core: avoid indention in poll_services_of_group" tries to reduce the indention, but the parts regarding the third if statement breaks the logic. So restore them and prevent vchiq_test from hanging during the ping test. Fixes: 2f440843a7d4 ("staging: vchiq_core: avoid indention in poll_services_of_group") Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Link: https://lore.kernel.org/r/1622735405-9980-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 47bb0afd6b84..bc6e12374f91 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -1340,23 +1340,21 @@ poll_services_of_group(struct vchiq_state *state, int group)
continue;
service_flags = atomic_xchg(&service->poll_flags, 0);
- if ((service_flags & BIT(VCHIQ_POLL_REMOVE)) == 0)
- continue;
-
- vchiq_log_info(vchiq_core_log_level, "%d: ps - remove %d<->%d",
- state->id, service->localport,
- service->remoteport);
+ if (service_flags & BIT(VCHIQ_POLL_REMOVE)) {
+ vchiq_log_info(vchiq_core_log_level, "%d: ps - remove %d<->%d",
+ state->id, service->localport,
+ service->remoteport);
- /*
- * Make it look like a client, because
- * it must be removed and not left in
- * the LISTENING state.
- */
- service->public_fourcc = VCHIQ_FOURCC_INVALID;
+ /*
+ * Make it look like a client, because
+ * it must be removed and not left in
+ * the LISTENING state.
+ */
+ service->public_fourcc = VCHIQ_FOURCC_INVALID;
- if (vchiq_close_service_internal(service, NO_CLOSE_RECVD) !=
- VCHIQ_SUCCESS) {
- request_poll(state, service, VCHIQ_POLL_REMOVE);
+ if (vchiq_close_service_internal(service, NO_CLOSE_RECVD) !=
+ VCHIQ_SUCCESS)
+ request_poll(state, service, VCHIQ_POLL_REMOVE);
} else if (service_flags & BIT(VCHIQ_POLL_TERMINATE)) {
vchiq_log_info(vchiq_core_log_level,
"%d: ps - terminate %d<->%d",