Commit 447fbc14 authored by Stefan Wahren's avatar Stefan Wahren Committed by Greg Kroah-Hartman
Browse files

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: 2f440843 ("staging: vchiq_core: avoid indention in poll_services_of_group")
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1622735405-9980-2-git-send-email-stefan.wahren@i2se.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bdf696a0
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -1340,9 +1340,7 @@ 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;

		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);
@@ -1355,7 +1353,7 @@ poll_services_of_group(struct vchiq_state *state, int group)
			service->public_fourcc = VCHIQ_FOURCC_INVALID;

			if (vchiq_close_service_internal(service, NO_CLOSE_RECVD) !=
						 VCHIQ_SUCCESS) {
							 VCHIQ_SUCCESS)
				request_poll(state, service, VCHIQ_POLL_REMOVE);
		} else if (service_flags & BIT(VCHIQ_POLL_TERMINATE)) {
			vchiq_log_info(vchiq_core_log_level,