mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
net: stmmac: use dma_addr_t for DMA addresses
In jumbo_frm() (implemented in both "chain_mode.c" and "ring_mode.c"), an unsigned integer local variable is used to hold the value returned by dma_map_single(). On systems where a dma_addr_t is 64 bits, the subsequent dma_mapping_error() check of the returned value operates only on the low 32 bits (whose high bit won't be sign-extended). In this case, dma_mapping_error() would return 0 (no error) even if there were one. Fix this in both spots by using a dma_addr_t for the local variable. Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://lore.kernel.org/linux-devicetree/20260606010122.21A211F00899@smtp.kernel.org/ Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Alex Elder <elder@riscstar.com> Link: https://patch.msgid.link/20260812163832.271742-2-elder@riscstar.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
97a1e65df7
commit
0c1f9020d2
2 changed files with 4 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue