mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fixup! net: designware_eqs: set upper 32bit address for DMA descriptors to support 64-bit addressing
@ 2026-08-05 14:21 Ahmad Fatoum
  2026-08-06 13:04 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2026-08-05 14:21 UTC (permalink / raw)
  To: barebox; +Cc: zhengxiaojun, Ahmad Fatoum

net: designware_eqos: fix left shift count >= width of type

CI builds with -Werror, including -Werror=shift-count-overflow, which
fails for STM32MP enabled platform that use EQOS on a 32-bit platform.

As des1 will have always been programmed to zero on a 32-bit platform,
we can just suppress the warning with a cast.

Cc: zhengxiaojun <zheng.xiaojun@foxmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/net/designware_eqos.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c
index 332dc7eb7366..4011b006dd70 100644
--- a/drivers/net/designware_eqos.c
+++ b/drivers/net/designware_eqos.c
@@ -955,8 +955,8 @@ void eqos_remove(struct device *dev)
 
 	mdiobus_unregister(&eqos->miibus);
 
-	dma = eqos->rx_descs[0].des1;
-	dma = (dma << 32) + eqos->rx_descs[0].des0;
+	dma = (u64)eqos->rx_descs[0].des1 << 32;
+	dma |= eqos->rx_descs[0].des0;
 	dma_free(phys_to_virt(dma));
 	dma_free_coherent(DMA_DEVICE_BROKEN,
 			  eqos->tx_descs, 0, EQOS_DESCRIPTORS_SIZE);
-- 
2.47.3




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-06 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-05 14:21 [PATCH] fixup! net: designware_eqs: set upper 32bit address for DMA descriptors to support 64-bit addressing Ahmad Fatoum
2026-08-06 13:04 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox