riscv: very large dma mappings can cause integer overflow

Fix the return type for _bus_dmamap_addseg().
Based on the same fix done for arm64 in r348571.

Sponsored by:	Axiado
This commit is contained in:
Kristof Provost 2020-09-02 11:33:31 +00:00
parent e7b2173d0b
commit 3bebdc0564
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365245

View File

@ -633,7 +633,7 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int flags)
/*
* Add a single contiguous physical range to the segment list.
*/
static int
static bus_size_t
_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr,
bus_size_t sgsize, bus_dma_segment_t *segs, int *segp)
{