Message ID | 20230111134513.2495510-4-conor.dooley@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3331698wrt; Wed, 11 Jan 2023 05:52:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXvH1NgO8n8FVOr9mM6MEHYvVhA+IzkBTVhgME+QQNtvbDuAJYHBAGifdQ9+sjYfa2KGvspE X-Received: by 2002:a05:6a20:6595:b0:b6:2fb9:b6d5 with SMTP id p21-20020a056a20659500b000b62fb9b6d5mr2936782pzh.62.1673445175976; Wed, 11 Jan 2023 05:52:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673445175; cv=none; d=google.com; s=arc-20160816; b=J2BTSZ+XGU/RBzpMTq6F5dviJVIgsdET97xMNDveo33R4oBVPSPvE6E+1QvQ1lOXGT 6WMCMK8SJMaItcYxNGsX/Ntfem2z2YvZkNfWY64tGuY6hWYZP1VK+VYm6apLj2OJcjMF f+U7gZ8E/LWzfKP559VO1Ad1G52w+JN+d/bgovIf/aBpVQdNJJfe9KBbs5ud3i0+oafT Gr3WSgSD90tr10emJdCG16spt3L+DaoHXsmXrP0cYt2vfzTEDq0gQkuy0YLCFEsp/fCl Kz6Q9LwAcaC7KEdHDpXfV7snoxgGtarSoVla4cSl181w6JW1LL4pi3LJsmGSs4RwscJu e8Lw== 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=EtZqizX7887kml0bmSTJ5PWjr3h50QRv3Trg62ZGdZuk0GXRNgOtbTpJpcTj6Bhkg1 p8c+TEV5Ag+oRvdB1W5p5PwxhI5Zc3Ier+2hWEy5T1u1G+yb2aOyL0SQqUokrN5DWmcw pcUEoV+ASdF6a/6MwMiTOO7E75vwevvawpFdDJx7IgF5jUw9XE5946yPiDRzKgkfqh8E N4M0QB3FulcKaeA/134W8PJKS8v5nQ6JAdYDUcuWulwD5BvD+68YbTGMt2suviYv3p7x FRKBFHT3l4oWD2BAzKU+V+3IlvsMDurczQ1V5XbRen2JTLeEtCOxf2NmovjWoFSNMAJ8 mEbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=0Ry91HPt; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q25-20020a637519000000b004b5f3fc9e14si3910025pgc.25.2023.01.11.05.52.42; Wed, 11 Jan 2023 05:52:55 -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=0Ry91HPt; 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 S238476AbjAKNqe (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Wed, 11 Jan 2023 08:46:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234188AbjAKNqV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Jan 2023 08:46:21 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F07DCD9 for <linux-kernel@vger.kernel.org>; Wed, 11 Jan 2023 05:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1673444758; x=1704980758; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FCOl+T+5C62VF4k5ASrJAWhazXtjeEzsINHVVaIW+hk=; b=0Ry91HPtVZCDtQ/Bh54bCilOLnnLD20Dyl1BsJc4GAe3ZmvgRP5MxdNe c/DvDQS/WwK9EOUh9WPBeOjMtMnBgZXn8s99ItWu2Og9YVQ8+Kl/maa7F JKx4ffICnj+6ikIVTir0dwZzHH5DogThOaQwWbf0MPcCTL3UMQTwVD/iy uFfUhQDAW3Dg94pnEDUlZ7Nk4+Cum3sOpVE9jL5oe7pt0ttEFANP34Rsj ErPZEuDQ2PFG6fPRuktsubnUqRbUgd3fRjJRP0ymiyTmsuozhDQFFXnrZ PsTS10TTmXzfs9SE5oNNpd+j6HKNvhb8x3FDD1z4oYqU4nrxLwpxJ1+oS w==; X-IronPort-AV: E=Sophos;i="5.96,317,1665471600"; d="scan'208";a="131834650" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Jan 2023 06:45:54 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 11 Jan 2023 06:45:52 -0700 Received: from wendy.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 11 Jan 2023 06:45:51 -0700 From: Conor Dooley <conor.dooley@microchip.com> To: Jassi Brar <jassisinghbrar@gmail.com> CC: Conor Dooley <conor.dooley@microchip.com>, Daire McNamara <daire.mcnamara@microchip.com>, <linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v1 3/7] mailbox: mpfs: ditch a useless busy check Date: Wed, 11 Jan 2023 13:45:09 +0000 Message-ID: <20230111134513.2495510-4-conor.dooley@microchip.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230111134513.2495510-1-conor.dooley@microchip.com> References: <20230111134513.2495510-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754734449021795711?= X-GMAIL-MSGID: =?utf-8?q?1754734449021795711?= |
Series |
MPFS system controller/mailbox fixes
|
|
Commit Message
Conor Dooley
Jan. 11, 2023, 1:45 p.m. UTC
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 <conor.dooley@microchip.com>
---
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);