From patchwork Wed Sep 18 16:31:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13807013 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BD23CDD548 for ; Wed, 18 Sep 2024 16:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6NB7gIho3b7wRkJwgPO0S9Hbxd8mww4c3rfNCcTKW9k=; b=qg+80of6gJrpPEqfeD+YeJe1SS y0vjPWxlHUnc+IwrDFo4hzUpgG2ZRz/PWjLorx9Ui5uVZ8tfRaJ7Zz4/lg+PGBtMRWUOS5F8zcwAA sWqFAzWzx5AxrYZQnXEjkcei2f29ADJzy74yNFOtkalbxLgwHEIEW9k9S4ApFlaGjuX9kEzTZMqZw OvIVMelNl5esd764XX2E5U0zF704Nbti684pPsogUhayx+Li/mSQe4Pj33IGCti+e9YRvkjNyRWMc PLPrwM6a9wKH1gZHf1BOrOzyV3u3KxyZJ7+ZtJaxfGb3JmVCLKloSkepx1aiU1zzoH9dsNihvUpx1 hglPQjKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sqxhY-00000008eHi-1B5z; Wed, 18 Sep 2024 16:38:48 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sqxak-00000008dJP-2vAy; Wed, 18 Sep 2024 16:31:48 +0000 Received: from umang.jain (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4DAE9D52; Wed, 18 Sep 2024 18:30:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1726677023; bh=Gve0uMYsv6ZYvapmFb9XKu322dhAffKigvnNzUNpz/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TRGAXEFQUU/4iV+pRTWVna2lvwGjEvRRvcpZ+p3jwT0Ej651GsbIzfkgc/9aF33uc 3zt5TTtFAJ11NdTpewbfoJ/WpifHPNnWmW4lCPyVsLfTb5MdCblz1ia7kzEJ7s59/K 7CmTChUuZVQng2reLs1IbCGeb3XFotvod8VErK0Q= From: Umang Jain To: Greg Kroah-Hartman , Broadcom internal kernel review list Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Kieran Bingham , Arnd Bergmann , Stefan Wahren , Laurent Pinchart , Nicolas Saenz Julienne , Umang Jain Subject: [PATCH 6/6] staging: vchiq_core: Drop retry loop on -EINTR Date: Wed, 18 Sep 2024 22:01:00 +0530 Message-ID: <20240918163100.870596-7-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240918163100.870596-1-umang.jain@ideasonboard.com> References: <20240918163100.870596-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240918_093146_895500_ACD47527 X-CRM114-Status: GOOD ( 10.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org -EINTR is returned by vchiq_queue_message() on receiving a fatal signal to the process. Since the process is deemed to be terminated anyway, do not retry queuing with vchiq_queue_message() on -EINTR. Signed-off-by: Umang Jain --- .../interface/vchiq_arm/vchiq_core.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 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 426e729b71ee..7ad43a3d1bab 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -3269,24 +3269,9 @@ vchiq_queue_message(struct vchiq_instance *instance, unsigned int handle, int vchiq_queue_kernel_message(struct vchiq_instance *instance, unsigned int handle, void *data, unsigned int size) { - int status; - - while (1) { - status = vchiq_queue_message(instance, handle, memcpy_copy_callback, - data, size); - - /* - * vchiq_queue_message() may return -EINTR, so we need to - * implement a retry mechanism since this function is supposed - * to block until queued - */ - if (status != -EINTR) - break; - msleep(1); - } - - return status; + return vchiq_queue_message(instance, handle, memcpy_copy_callback, + data, size); } EXPORT_SYMBOL(vchiq_queue_kernel_message);