From patchwork Mon Dec 19 11:57:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 34482 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2343865wrn; Mon, 19 Dec 2022 04:02:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf7M80s3veFjechuYD3+8B0RkRtCUpa642Q32k3ttHp4TSvOCgxkrbz8dupQj44ckuDSjeVz X-Received: by 2002:a05:6a20:ba8f:b0:ac:7539:389f with SMTP id fb15-20020a056a20ba8f00b000ac7539389fmr45599736pzb.56.1671451369580; Mon, 19 Dec 2022 04:02:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671451369; cv=none; d=google.com; s=arc-20160816; b=bhCxhE2JBmlEred0dMVEvzo1sSb91tg+bWkNnqomcSqyz3uOfv1F+6df7MLVC/OQup Zrj+I1US96oYIJJQPrWy2dJgJ2chJW78lJot//FVbWAe5NP+KhQiasUyBG3z0SSgRyfb K9bv77PhfMJgNlu9Une5tEOljvRjNJ0ZiQnPR/ILbZBXWiSFZ6u2kgW416EVhq3HHHFL UQjp2Vh0pG190jxw2gkzB3MW52bZV2+dGybPEP7l1qp1aPXHxwmNb6Kz3iDnlK3owcKH uJJ51CKwhZLtq5Ldc80zgsj31kKE4g6qr734TyI/In8KuQ36n4MeLTK+sGv2bS7Vjp9q 1ijA== 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=VxSrd0Gob5HmlZLTArfCZXyByBVFCysHJQzuvczuLrQ=; b=tI5YQQUQZtOq/eLqFwx+LUmac4ykPoyY29ZJRiiC76GEN9KNX5EJ7YtILaqnACipy+ 1erXyX/XzzTcoNWXholzDS9pevp/+Qaoo3eOGM5kpBfQjVkWYtM8SBIuspSu9eNRfMB9 qa9acrvyrZiNmZoH+r6nn58P+tlQyeKbm7Hrz6PcO06CYm2M4LTAhWhFXgE5Rq/ieaW1 9pP4xG9tbyDo9lOtk7XKBMkKa7dRGUciQfQBKfMBheWapR1AL3FwO3O/X6o5lhAbpC2y csKIFJ142C792Mv1sjmAe/zefh9H3Let/SPJQ5eQEFEX9G8mzAni0u0i2r4X1OipXnkx pxvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="VJ/3b6+7"; 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 q18-20020a631f52000000b004791f802befsi10270217pgm.275.2022.12.19.04.02.36; Mon, 19 Dec 2022 04:02:49 -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="VJ/3b6+7"; 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 S231773AbiLSL6g (ORCPT + 99 others); Mon, 19 Dec 2022 06:58:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbiLSL6Q (ORCPT ); Mon, 19 Dec 2022 06:58:16 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F9E3F039; Mon, 19 Dec 2022 03:58:15 -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 AF18C825; Mon, 19 Dec 2022 12:58:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1671451094; bh=U4AsQkzYd1PDi/2MceWavcKccSKSoRxFVZd5HokQOSM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VJ/3b6+7HMvZn1HMYMUJndDv2VTxgGfZCPJ7bQVANEjCfQopAZxUz/UvTnuXAjsHy KGCQsAn4REpMFKCxVXJUIgvWe124ah8A0GMdfRuOlysHmzm+TA4pxqC9pPlOPEq21w JpKKwvg81MM/K70epa92UL16yF53SVst+ZC2TvT8= 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 v2 5/7] vc04_services: vchiq_arm: Drop VCHIQ_RETRY usage on disconnect Date: Mon, 19 Dec 2022 17:27:23 +0530 Message-Id: <20221219115725.11992-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221219115725.11992-1-umang.jain@ideasonboard.com> References: <20221219115725.11992-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?1752643791552469083?= X-GMAIL-MSGID: =?utf-8?q?1752643791552469083?= 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, 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. Fixes: 71bad7f08641 ("staging: add bcm2708 vchiq driver") 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 9c64d5de810e..ddb6d0f4daed 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 -ENOTCONN; 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 -ENOTCONN; return queue_message(state, NULL, MAKE_REMOTE_USE_ACTIVE, NULL, NULL, 0, 0);