All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Davis <afd@ti.com>
To: Jassi Brar <jassisinghbrar@gmail.com>,
	Hari Nagalla <hnagalla@ti.com>, Nick Saulnier <nsaulnier@ti.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: <linux-remoteproc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Andrew Davis <afd@ti.com>
Subject: [PATCH 05/13] mailbox: omap: Remove unneeded header omap-mailbox.h
Date: Mon, 25 Mar 2024 12:20:37 -0500	[thread overview]
Message-ID: <20240325172045.113047-6-afd@ti.com> (raw)
In-Reply-To: <20240325172045.113047-1-afd@ti.com>

The type of message sent using omap-mailbox is always u32. The definition
of mbox_msg_t is uintptr_t which is wrong as that type changes based on
the architecture (32bit vs 64bit). This type should have been defined as
u32. Instead of making that change here, simply remove the header usage
and fix the last couple users of the same in this driver.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 drivers/mailbox/omap-mailbox.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index 167348fb1b33b..4c673cb732ed1 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -19,7 +19,6 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
-#include <linux/omap-mailbox.h>
 #include <linux/mailbox_controller.h>
 #include <linux/mailbox_client.h>
 
@@ -239,16 +238,14 @@ static void mbox_rx_work(struct work_struct *work)
 {
 	struct omap_mbox_queue *mq =
 			container_of(work, struct omap_mbox_queue, work);
-	mbox_msg_t data;
 	u32 msg;
 	int len;
 
 	while (kfifo_len(&mq->fifo) >= sizeof(msg)) {
 		len = kfifo_out(&mq->fifo, (unsigned char *)&msg, sizeof(msg));
 		WARN_ON(len != sizeof(msg));
-		data = msg;
 
-		mbox_chan_received_data(mq->mbox->chan, (void *)data);
+		mbox_chan_received_data(mq->mbox->chan, (void *)(uintptr_t)msg);
 		spin_lock_irq(&mq->lock);
 		if (mq->full) {
 			mq->full = false;
@@ -515,7 +512,7 @@ static int omap_mbox_chan_send_data(struct mbox_chan *chan, void *data)
 {
 	struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
 	int ret;
-	u32 msg = omap_mbox_message(data);
+	u32 msg = (u32)(uintptr_t)(data);
 
 	if (!mbox)
 		return -EINVAL;
-- 
2.39.2


  parent reply	other threads:[~2024-03-25 17:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 17:20 [PATCH 00/13] OMAP mailbox FIFO removal Andrew Davis
2024-03-25 17:20 ` [PATCH 01/13] mailbox: omap: Remove unused omap_mbox_{enable,disable}_irq() functions Andrew Davis
2024-03-25 17:20 ` [PATCH 02/13] mailbox: omap: Remove unused omap_mbox_request_channel() function Andrew Davis
2024-03-25 17:20 ` [PATCH 03/13] mailbox: omap: Move omap_mbox_irq_t into driver Andrew Davis
2024-03-25 17:20 ` [PATCH 04/13] mailbox: omap: Move fifo size check to point of use Andrew Davis
2024-03-25 17:20 ` Andrew Davis [this message]
2024-03-25 17:20 ` [PATCH 06/13] mailbox: omap: Remove device class Andrew Davis
2024-03-25 17:20 ` [PATCH 07/13] mailbox: omap: Use devm_pm_runtime_enable() helper Andrew Davis
2024-03-25 17:20 ` [PATCH 08/13] mailbox: omap: Merge mailbox child node setup loops Andrew Davis
2024-03-25 17:20 ` [PATCH 09/13] mailbox: omap: Use function local struct mbox_controller Andrew Davis
2024-03-25 17:20 ` [PATCH 10/13] mailbox: omap: Use mbox_controller channel list directly Andrew Davis
2024-03-25 17:20 ` [PATCH 11/13] mailbox: omap: Remove mbox_chan_to_omap_mbox() Andrew Davis
2024-03-25 17:20 ` [PATCH 12/13] mailbox: omap: Reverse FIFO busy check logic Andrew Davis
2024-04-01 23:31   ` Hari Nagalla
2024-04-01 23:47     ` Andrew Davis
2024-03-25 17:20 ` [PATCH 13/13] mailbox: omap: Remove kernel FIFO message queuing Andrew Davis
2024-04-01 23:39   ` Hari Nagalla
2024-04-01 23:50     ` Andrew Davis

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=20240325172045.113047-6-afd@ti.com \
    --to=afd@ti.com \
    --cc=andersson@kernel.org \
    --cc=hnagalla@ti.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=nsaulnier@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.