From patchwork Thu Dec 15 06:58:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 33532 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp192308wrn; Wed, 14 Dec 2022 23:15:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXuoVuDoEVwbX82qwIcNBiT93vawrsemtnZFOD5kOZ5Xs4Pi2vI+4QHWG48/DMUHwsU6FHmg X-Received: by 2002:aa7:d758:0:b0:472:9af1:163f with SMTP id a24-20020aa7d758000000b004729af1163fmr4200888eds.37.1671088544444; Wed, 14 Dec 2022 23:15:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671088544; cv=none; d=google.com; s=arc-20160816; b=Z+NrU/pTgHluTZQuZ9kf4f5Oav32NIHHKRjmHALJgSrx4eYzc15D11zSMmsUxyvRQE TiTlfI5IWivDV/B0N56iQCxLzpy91IPgUesqbmYdWxmmmrdZ52frD3+XbGA8sYLiwOoN 9HjdiK+mWf5YCJItNN+rnWjK3uQy7p3DJNZ2Ncuz/EWWGs8Cy81JxUNw/ZRAJyQmDJrq SLKNv38yuatLB6R5OxCsDaWGHIChI++T3kM9rth/ialK4PJWQS4roHbNDToXqMYrBJBB uEN9w7J2nQfj/IYnMaOa05C1gz83HirC621uxcEEpf2rtPu1a5w08hL3PZ11HMjDngOJ VA1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uxVQBuHgRToQcW7snmlU/teDkBtrNfPSsDPb8nTOX0k=; b=ogJVrs3dgbRzCDos1INpZZNBDt1G0l003FcvJGA67JhW6sccjuc4dnoELrR02l0D7X WWVOv+JnFhZjEKbnO0PxA04+6M8V1o+nF5N2W2UYREoJtDOD6nhn+FcShSARCXX1WBAs sLLoxRHgVGbY93K5zgKwd2PeXQfI6kzDNRAJ8MLH8oSrYX43y5Uv605+TuDoNJE3T9fW s5eGY2bfYU62yPbs6h2Y0kZ1DHCLWmoTimFqEqBP34RJc6SCQleTD1yo4uxSug8bDf0j Brn9IRUDo8hnutrbyXifAwwu+G9BoxHJgliGl02xcAr7TRcTy5hL5khVdNcYy6xt+CB/ wy6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=E2kL8RTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a056402084900b0046b1827eda2si5151258edz.74.2022.12.14.23.15.20; Wed, 14 Dec 2022 23:15:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=E2kL8RTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbiLOHGD (ORCPT + 99 others); Thu, 15 Dec 2022 02:06:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbiLOHFS (ORCPT ); Thu, 15 Dec 2022 02:05:18 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 614AE6DCC4; Wed, 14 Dec 2022 22:59:58 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2401:4900:1f3e:7d24:3f0:3e81:fb16:ab4d]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 334481AF1; Thu, 15 Dec 2022 07:59:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1671087597; bh=tGKDm9IaLOkb32IokIFCjyMV/cszFOtaz/61xW0mvQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E2kL8RTLLjLhvzsvBEP15qB08HEGHNXMeIRGWhZm2559IytwCmyPsixt8XfYFEPii UIEjNbyO6WRO5IIouSnZpZv7doV7UxSICBHiqzrv+98mQ8qyOkV/k5l48SfOryznCI cCdL5367BZmsouUMFxXXi/9fZTJSY3X6DFOJNBxU= From: Umang Jain To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Kees Cook , Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH 5/7] vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnect Date: Thu, 15 Dec 2022 12:28:51 +0530 Message-Id: <20221215065853.34477-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221215065853.34477-1-umang.jain@ideasonboard.com> References: <20221215065853.34477-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752263341423317332?= X-GMAIL-MSGID: =?utf-8?q?1752263341423317332?= Drop the usage of VCHIQ_RETRY when the vchiq has connection status VCHIQ_CONNSTATE_DISCONNECTED. Disconnected is will not be valid to carry on a retry, replace the VCHIQ_RETRY with -EINVAL. 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 --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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 07a3d3a55092..3b36b0644ae3 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -3641,7 +3641,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 -EINVAL; return queue_message(state, NULL, MAKE_REMOTE_USE, NULL, NULL, 0, 0); } @@ -3649,7 +3649,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 -EINVAL; return queue_message(state, NULL, MAKE_REMOTE_USE_ACTIVE, NULL, NULL, 0, 0);