Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2732420rwb; Fri, 20 Jan 2023 06:46:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXvLPKJUtwDgSGzvTk1ruJQRnqMPV2jYYowU9ULrwuKK0dCCtuzjlx176jaXypUQ0KU+cERd X-Received: by 2002:aa7:dd48:0:b0:497:233d:3ef7 with SMTP id o8-20020aa7dd48000000b00497233d3ef7mr15737637edw.7.1674226007610; Fri, 20 Jan 2023 06:46:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674226007; cv=none; d=google.com; s=arc-20160816; b=WZcYQen7x2xT1TO3aTzmeK/UOUD+zgfX06KDaPeHraA4X8oOfGGSC00nRygHaaUAAy +gVkBKBcZXSNItVl2gtR9ICYLs5GkqYDErnTg2O2KYpxO/lNf4D2rC64g4v476KkLve1 qfrvWUgWR9STBLJeA3egphxZN482hWf/uDqIrnu60XNQYnnE2YOMxVs7qjrLz8YaCB0s Sjm7MRazyyIh1nCb6+yn+5+qEv5LGSMmuYxbNLnlzonVkfWkxSCu9Kc2oVLLMqiMA/dX IamEfxd/CmeTg6oGjK44T+la7xeK0ImIb/d1/4icwRTwlHbwa37/a+ClMeQXofEGGR/t 19Mg== 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=IEXScj+wkOgNyRHP2akOEgXq581JeFAL1yUF7YcOF5A=; b=GIg4zp75sEYni+6V4eoAQZy+qqZe2hvZVbKCJneu1I0E2VO0cnSTvcOhFGerVz1cxR eUiZnAzxBm64q14BtDDLQ53eYROy175s4eoQWxfAceAoV4Bm9tWGUGM/2SRMUtFzTR6q nQ0XSIK/wqMY7mH0T2Kdw4dq+Cc+wdTnAOx8S7rlwy1LKqd4tYfU9FN+ol+PfxyIrJMt ZVcaDE5lptecc7C9md3PwYMDmarugC7Z2n9Og92xFYUZZzYNArX41z3x/lgbCCP83a3O xw/n0EM2kQfL/c20FdWWCU7PdfQnceiWt4zfVEaHEun7rU+i6DhXCPkXzA7uxj+otbUg n+oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=BZGfal6b; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a056402084b00b0046bc9cbd8f0si53954539edz.504.2023.01.20.06.46.35; Fri, 20 Jan 2023 06:46:47 -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 header.i=@microchip.com header.s=mchp header.b=BZGfal6b; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230262AbjATOkP (ORCPT + 49 others); Fri, 20 Jan 2023 09:40:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbjATOkF (ORCPT ); Fri, 20 Jan 2023 09:40:05 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B540E42BFA for ; Fri, 20 Jan 2023 06:39:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1674225569; x=1705761569; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FCOl+T+5C62VF4k5ASrJAWhazXtjeEzsINHVVaIW+hk=; b=BZGfal6b9V7vhVSLhQo9C76kBTqnV/Lh3b2O8YQ924WEB8UOF+T0+RIn hkMuRXLsl1+PCPcxjZlMpntouM3laDJpHrATZlGqGrhnaaTLpM+Q0eB6y D5XjB06rHLnfm2CsMcWKkem1B7bnpPWIQxs9iidqfrhRHXn5+lz7BlmYo v8MiEKuBrNQ0Uja9vi8oSd/YdyxViwptlTRYQhwx56r3ean4x7KWcsiOQ rmMvMDIDoFsNMIIBBAoUKNibrzvb7Pd9pMyQ7ca/IW76wBzBSXv13aBva RNTLMBfILYtd/qE68yxei4pf/kYErvt8dl0hgX0WQvU6oJaTdNn+kKJ+y Q==; X-IronPort-AV: E=Sophos;i="5.97,232,1669100400"; d="scan'208";a="196713305" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Jan 2023 07:38:14 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 20 Jan 2023 07:38:14 -0700 Received: from wendy.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Fri, 20 Jan 2023 07:38:13 -0700 From: Conor Dooley To: Jassi Brar CC: Conor Dooley , Daire McNamara , , Subject: [PATCH v2 3/7] mailbox: mpfs: ditch a useless busy check Date: Fri, 20 Jan 2023 14:37:31 +0000 Message-ID: <20230120143734.3438755-4-conor.dooley@microchip.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120143734.3438755-1-conor.dooley@microchip.com> References: <20230120143734.3438755-1-conor.dooley@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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 mpfs_mbox_rx_data() already checks if the system controller is busy before attempting to do anything, so drop the second check before reading any data. No functional change intended. Signed-off-by: Conor Dooley --- drivers/mailbox/mailbox-mpfs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mailbox/mailbox-mpfs.c b/drivers/mailbox/mailbox-mpfs.c index e0e825bdbad9..0d176aba3462 100644 --- a/drivers/mailbox/mailbox-mpfs.c +++ b/drivers/mailbox/mailbox-mpfs.c @@ -170,12 +170,10 @@ static void mpfs_mbox_rx_data(struct mbox_chan *chan) if (response->resp_status) return; - if (!mpfs_mbox_busy(mbox)) { - for (i = 0; i < num_words; i++) { - response->resp_msg[i] = - readl_relaxed(mbox->mbox_base - + mbox->resp_offset + i * 0x4); - } + for (i = 0; i < num_words; i++) { + response->resp_msg[i] = + readl_relaxed(mbox->mbox_base + + mbox->resp_offset + i * 0x4); } mbox_chan_received_data(chan, response); -- 2.39.0