busdma_iommu: Eliminate a redundant trunc_page()

Since OFF_TO_IDX() inherently truncates the given value, there is no
need to perform trunc_page() on it.

MFC after:	2 weeks
This commit is contained in:
Alan Cox 2022-06-20 13:40:42 -05:00
parent 70b5d8fa0f
commit 32e82bcc15

View File

@ -634,7 +634,7 @@ iommu_bus_dmamap_load_something1(struct bus_dma_tag_iommu *tag,
segs[seg].ds_addr = entry->start + offset;
segs[seg].ds_len = buflen1;
idx += OFF_TO_IDX(trunc_page(offset + buflen1));
idx += OFF_TO_IDX(offset + buflen1);
offset += buflen1;
offset &= IOMMU_PAGE_MASK;
buflen -= buflen1;