staging: vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnect
authorUmang Jain <umang.jain@ideasonboard.com>
Fri, 23 Dec 2022 12:24:02 +0000 (17:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jan 2023 18:22:37 +0000 (19:22 +0100)
Drop the usage of VCHIQ_RETRY when the vchiq has connection status
VCHIQ_CONNSTATE_DISCONNECTED. Disconnected status will not be valid to
carry on a retry, hence replace the VCHIQ_RETRY with -ENOTCONN.

This patch removes the usage of vCHIQ_RETRY completely and act as
intermediatory to address the TODO item:
* Get rid of custom function return values
for vc04_services/interface.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/20221223122404.170585-6-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

index 5a500fa..7d0d576 100644 (file)
@@ -3651,7 +3651,7 @@ vchiq_loud_error_footer(void)
 int vchiq_send_remote_use(struct vchiq_state *state)
 {
        if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED)
-               return VCHIQ_RETRY;
+               return -ENOTCONN;
 
        return queue_message(state, NULL, MAKE_REMOTE_USE, NULL, NULL, 0, 0);
 }
@@ -3659,7 +3659,7 @@ int vchiq_send_remote_use(struct vchiq_state *state)
 int vchiq_send_remote_use_active(struct vchiq_state *state)
 {
        if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED)
-               return VCHIQ_RETRY;
+               return -ENOTCONN;
 
        return queue_message(state, NULL, MAKE_REMOTE_USE_ACTIVE,
                             NULL, NULL, 0, 0);