From: Umang Jain Date: Fri, 23 Dec 2022 12:24:02 +0000 (+0530) Subject: staging: vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnect X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=030691e1357b99110382b4780f8f5d5715565dde;p=linux.git staging: vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnect 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 Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20221223122404.170585-6-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman --- 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 5a500fa7c908a..7d0d5763d3c86 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -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);