From patchwork Mon May 2 09:02:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 12834006 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 25809C433EF for ; Mon, 2 May 2022 09:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KhJ/0bV2NdzPmePk0VM+os7WRHSNIX3C/+qadkLQg4c=; b=dEvfUw/H0+jvDD srpz4W3FA7VqKejceYkYhCHPhG5AQQfl/dD56wXColcvbUAex5qucIi/NtfJn5xEZ8stzdZWVFfih dXgeUEyFIHYpgJAGLDbCXYWBe4iEWGnRwtHYMxvn+/a1Q92EfvTAxhtIZEJbIlzZ4sf6gFsT1WpY+ sKQyDCTpC1Oil4hFisHkg61xorAyA+OM+GW2rMO7HKgl31sLDhCChNXkHwv0XvZIxXkOa7ueGvUf0 FCEpQxQfoM5jOyqSqid+E3083tii+7aOIPMCaf6NF1GD8RGDjJH0f67YiOWBdZrdBqMnt8PTY/gs0 zKxIXaEXRmzpMCSMOYBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlRxD-000VEH-UN; Mon, 02 May 2022 09:02:52 +0000 Received: from marcansoft.com ([2a01:298:fe:f::2] helo=mail.marcansoft.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlRx1-000VB0-Vx for linux-arm-kernel@lists.infradead.org; Mon, 02 May 2022 09:02:41 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hector@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 218CE419C2; Mon, 2 May 2022 09:02:32 +0000 (UTC) From: Hector Martin To: Cc: Hector Martin , Anup Patel , Vinod Koul , Sven Peter , Alyssa Rosenzweig , Mun Yew Tham , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Michal Simek , Arnd Bergmann , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 1/7] mailbox: zynq: Remove unused zynqmp_ipi_peek_data Date: Mon, 2 May 2022 18:02:19 +0900 Message-Id: <20220502090225.26478-2-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220502090225.26478-1-marcan@marcan.st> References: <20220502090225.26478-1-marcan@marcan.st> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220502_020240_211798_92377902 X-CRM114-Status: GOOD ( 14.38 ) 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 This op was ambiguously specified, and the way it was interpreted for this implementation is not useful. It has no users, so remove it. Signed-off-by: Hector Martin --- drivers/mailbox/zynqmp-ipi-mailbox.c | 41 ---------------------------- 1 file changed, 41 deletions(-) diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c index 31a0fa914274..7c3ef7c8078e 100644 --- a/drivers/mailbox/zynqmp-ipi-mailbox.c +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c @@ -177,46 +177,6 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data) return IRQ_NONE; } -/** - * zynqmp_ipi_peek_data - Peek to see if there are any rx messages. - * - * @chan: Channel Pointer - * - * Return: 'true' if there is pending rx data, 'false' if there is none. - */ -static bool zynqmp_ipi_peek_data(struct mbox_chan *chan) -{ - struct device *dev = chan->mbox->dev; - struct zynqmp_ipi_mbox *ipi_mbox = dev_get_drvdata(dev); - struct zynqmp_ipi_mchan *mchan = chan->con_priv; - int ret; - u64 arg0; - struct arm_smccc_res res; - - if (WARN_ON(!ipi_mbox)) { - dev_err(dev, "no platform drv data??\n"); - return false; - } - - arg0 = SMC_IPI_MAILBOX_STATUS_ENQUIRY; - zynqmp_ipi_fw_call(ipi_mbox, arg0, 0, &res); - ret = (int)(res.a0 & 0xFFFFFFFF); - - if (mchan->chan_type == IPI_MB_CHNL_TX) { - /* TX channel, check if the message has been acked - * by the remote, if yes, response is available. - */ - if (ret < 0 || ret & IPI_MB_STATUS_SEND_PENDING) - return false; - else - return true; - } else if (ret > 0 && ret & IPI_MB_STATUS_RECV_PENDING) { - /* RX channel, check if there is message arrived. */ - return true; - } - return false; -} - /** * zynqmp_ipi_last_tx_done - See if the last tx message is sent * @@ -387,7 +347,6 @@ static void zynqmp_ipi_shutdown(struct mbox_chan *chan) static const struct mbox_chan_ops zynqmp_ipi_chan_ops = { .startup = zynqmp_ipi_startup, .shutdown = zynqmp_ipi_shutdown, - .peek_data = zynqmp_ipi_peek_data, .last_tx_done = zynqmp_ipi_last_tx_done, .send_data = zynqmp_ipi_send_data, };