The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
	Christian Gromm <christian.gromm@microchip.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>, linux-kernel@vger.kernel.org
Subject: [PATCH RESEND] most: core: Use u32 for coherent_buf_size in most_free_mbo_coherent
Date: Mon, 25 May 2026 11:38:56 +0200	[thread overview]
Message-ID: <20260525093855.819955-2-thorsten.blum@linux.dev> (raw)

Use u32 for 'coherent_buf_size' in most_free_mbo_coherent() to match the
type used in arm_mbo_chain() and to avoid narrowing the sum to u16
before passing it to dma_free().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/most/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/most/core.c b/drivers/most/core.c
index c2616da8bceb..92764e5c27c9 100644
--- a/drivers/most/core.c
+++ b/drivers/most/core.c
@@ -100,7 +100,7 @@ static const struct {
 static void most_free_mbo_coherent(struct mbo *mbo)
 {
 	struct most_channel *c = mbo->context;
-	u16 const coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len;
+	u32 const coherent_buf_size = c->cfg.buffer_size + c->cfg.extra_len;
 
 	if (c->iface->dma_free)
 		c->iface->dma_free(mbo, coherent_buf_size);

                 reply	other threads:[~2026-05-25  9:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260525093855.819955-2-thorsten.blum@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=christian.gromm@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=parthiban.veerasooran@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox