linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hector Martin <marcan@marcan.st>
To: unlisted-recipients:; (no To-header on input)
Cc: Hector Martin <marcan@marcan.st>,
	Anup Patel <anup.patel@broadcom.com>,
	Vinod Koul <vkoul@kernel.org>, Sven Peter <sven@svenpeter.dev>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Mun Yew Tham <mun.yew.tham@intel.com>,
	Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Michal Simek <michal.simek@xilinx.com>,
	Arnd Bergmann <arnd@arndb.de>,
	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	[thread overview]
Message-ID: <20220502090225.26478-2-marcan@marcan.st> (raw)
In-Reply-To: <20220502090225.26478-1-marcan@marcan.st>

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 <marcan@marcan.st>
---
 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,
 };
-- 
2.35.1


  reply	other threads:[~2022-05-02  9:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02  9:02 [PATCH 0/7] mailbox: apple: peek_data cleanup and implementation Hector Martin
2022-05-02  9:02 ` Hector Martin [this message]
2022-05-02  9:02 ` [PATCH 2/7] mailbox: sun6i: Unexport unused sun6i_msgbox_peek_data Hector Martin
2022-05-02 23:18   ` Samuel Holland
2022-05-02  9:02 ` [PATCH 3/7] mailbox: ti-msgmgr Remove unused ti_msgmgr_queue_peek_data Hector Martin
2022-05-02  9:02 ` [PATCH 4/7] mailbox: altera: Remove unused altera_mbox_peek_data Hector Martin
2022-05-02  9:02 ` [PATCH 5/7] mailbox: Rename peek_data to poll_data and fix documentation Hector Martin
2022-05-02  9:02 ` [PATCH 6/7] mailbox: apple: Implement flush() operation Hector Martin
2022-05-02  9:02 ` [PATCH 7/7] mailbox: apple: Implement poll_data() operation Hector Martin
2022-05-02  9:05 ` [PATCH 0/7] mailbox: apple: peek_data cleanup and implementation Hector Martin
2022-05-24 14:55 ` jassisinghbrar
2022-05-24 15:15   ` Hector Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220502090225.26478-2-marcan@marcan.st \
    --to=marcan@marcan.st \
    --cc=alyssa@rosenzweig.io \
    --cc=anup.patel@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=dmaengine@vger.kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=michal.simek@xilinx.com \
    --cc=mun.yew.tham@intel.com \
    --cc=samuel@sholland.org \
    --cc=sven@svenpeter.dev \
    --cc=vkoul@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).