Skip to contentSkip to conversation

most: core: Use u32 for coherent_buf_size in most_free_mbo_coherent

PATCH Superseded Thorsten Blum 1 participant 1 message Mar 21 Most(r) technology driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 most: core: Use u32 for coherent_buf_size in most_free_mbo_coherent

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().

---
 drivers/most/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/most/core.c +1 -1
index c2616da8bceb..92764e5c27c9 100644
@@ -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);