Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2570067ybv; Fri, 14 Feb 2020 22:20:42 -0800 (PST) X-Google-Smtp-Source: APXvYqz4HZhu20a5IFaVMInZnhBuMByy6+c4Moz9BmIq7T9wrD3F534J7jyZBuGy0a/t4YE+Cz5I X-Received: by 2002:aca:1011:: with SMTP id 17mr4393572oiq.72.1581747642051; Fri, 14 Feb 2020 22:20:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581747642; cv=none; d=google.com; s=arc-20160816; b=EfY8Rw6nreyaw9T4Fy+s958kObwenSbO6aSr7HjRig/HQ6tWq7cx894suamT0u0sbE b2KnsRpMtCFzgB/6p5yD622KbeoZ07KkGHkY0/3VQA+O3831N8GLvCMtQeb/aFiITt6b kZa6znvpi5RoXwDwcNwuJ2Ekm4W+cFQ6y+EZGmXXCLh+VWNbK1bthnFNLvMDlFq4W+Nt gw9NQmcgACV5kgM9XliQKoOskDaLp//VCG9iXIKtpp2f6INaNsUhgZXiKNHRy+zRSJxL 5TIGgUFGamCLKCtPgflwXm4X7SN1F1Hmg6lw+Az4XC/jD22x+x/NpQc/T6gEYeV4YWGl k/JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=hSouSsobAjpXDJaLkOFL8Uc12VDY8WT1xUChd1bBKcU=; b=PMWpICzr7JM/SCUG+UatBxwWHz3rNaH5m5MGrmoWjZkB19NA9yrkhuCy5zefr4iqLS 1kZjS9GJAANsIBWxfwC6EI0B9EvfJWWyu8EtoRkKR1+gItJdeVU2NhziScjZqYzvNvjO KcVUlgJu11nbX4/sfwfF1SBeHcO632+kq9ddh9Gr8ST8o1LxaB5GG9bmmRfAY318+z5G +GugZ0TCioKXqqemqS9FPj4M0DP9S2Fj+SrY78RAfMVu+rASEjyg39akFA2HDomoNDPx WCTXDDmyWtLvsh18ucgE7no2cGiJmTrU5xCLNKj9ksDXFKWnuuRV5WWl3V4WblJdTwsM aZXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="gv/O6tdl"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Pknkfcus; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c144si4112365oig.263.2020.02.14.22.20.29; Fri, 14 Feb 2020 22:20:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b="gv/O6tdl"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Pknkfcus; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbgBOGT6 (ORCPT + 99 others); Sat, 15 Feb 2020 01:19:58 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:54219 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725795AbgBOGT5 (ORCPT ); Sat, 15 Feb 2020 01:19:57 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 2C36D63BC; Sat, 15 Feb 2020 01:19:56 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 15 Feb 2020 01:19:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=hSouSsobAjpXD JaLkOFL8Uc12VDY8WT1xUChd1bBKcU=; b=gv/O6tdl9sBP7jCtfkxkDFrwgjAph YddeeE8QyFfunM6WNW6WDhp6dKRxJ9ZSS4ElI1PjXuTL+C1dGpnsJWCPmV6FLPTx oNFzQSG2JSgsxyhnT1y7RH4bj1nDWQlc6zcL02QFTQOPi6AKljAZe38I+dfWjLoU hS+ivdXIGEoaXFLs1iOIm74Ob6RnQB8QGBKYoUXEh0rUP5UuQI+pKWDGHP0Nu82w obz/2eAtLNk+jsoWvWKFfktYwuOW31JN0vnf5l8d7baNQmZUazEolpiumy/Y/mPr JAn6TLgkZDQBDDuVHZZoJsS+ynEtb/Qgxz9d7x9FfDpmN60PxzntCPe5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=hSouSsobAjpXDJaLkOFL8Uc12VDY8WT1xUChd1bBKcU=; b=Pknkfcus VEhmh2/e/67xrculb+Cf1x1qh08QQ3jqF/fTLvjLtcsA7LGP00bxKeMosbWEwoSU eFZdxQAfr3UDcdEYdH6aWckCN2JTMCFDKoEDQ6jxjqf8NakV4zVfjZfYqbUIbbdD Ye+l/eym5Ug+xN91gQM4b7+42KhQMNDQSzQ4YEUmdHRmCh2SrbdOkx6HvAMV8P/g jLUhL4jAJFDuF7yxfdeNE63Vc10ipmLEwn1Ml5L+CDZBtiAPKKSPOW12fAxR8EFZ hHMC0v/gaJsHYeyF/YqbgeduDTHNP+jhy2DjaOhpOwVKjCUCttVHeeHp9x2IsHub SIA0oRh82zsukA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjedugdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecukfhppe ejtddrudefhedrudegkedrudehudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 061CF328005A; Sat, 15 Feb 2020 01:19:53 -0500 (EST) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jassi Brar , Rob Herring , Mark Rutland , Philipp Zabel , Ondrej Jirman , Vasily Khoruzhick Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Samuel Holland Subject: [PATCH] mailbox: sun6i-msgbox: Remove unneeded FIFO status check Date: Sat, 15 Feb 2020 00:19:53 -0600 Message-Id: <20200215061953.55300-1-samuel@sholland.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A transmit FIFO can never be full, because the mailbox framework waits until mbox->ops->last_tx_done() succeeds before sending the next message. sun6i_msgbox_last_tx_done() ensures that the FIFO is empty. Since the extra check here is unnecessary, remove it. Signed-off-by: Samuel Holland --- drivers/mailbox/sun6i-msgbox.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/mailbox/sun6i-msgbox.c b/drivers/mailbox/sun6i-msgbox.c index 15d6fd522dc5..ccecf2e5941d 100644 --- a/drivers/mailbox/sun6i-msgbox.c +++ b/drivers/mailbox/sun6i-msgbox.c @@ -106,12 +106,6 @@ static int sun6i_msgbox_send_data(struct mbox_chan *chan, void *data) if (WARN_ON_ONCE(!(readl(mbox->regs + CTRL_REG(n)) & CTRL_TX(n)))) return 0; - /* We cannot post a new message if the FIFO is full. */ - if (readl(mbox->regs + FIFO_STAT_REG(n)) & FIFO_STAT_MASK) { - mbox_dbg(mbox, "Channel %d busy sending 0x%08x\n", n, msg); - return -EBUSY; - } - writel(msg, mbox->regs + MSG_DATA_REG(n)); mbox_dbg(mbox, "Channel %d sent 0x%08x\n", n, msg); -- 2.24.1