mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
PCI: edma: Fix Coverity Issues
Perform ULL typecast during total size calculation for numerics. Bug 3956683 Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com> Change-Id: Id9671dc37ff8747a6390063cc92a038e355990cc Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2881281 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
01d8319aae
commit
0221df9441
@@ -636,7 +636,7 @@ edma_xfer_status_t tegra_pcie_edma_submit_xfer(void *cookie,
|
|||||||
dma_ll_virt = &db->desc[ch->db_pos];
|
dma_ll_virt = &db->desc[ch->db_pos];
|
||||||
dma_ll_virt->size = tx_info->desc[i].sz;
|
dma_ll_virt->size = tx_info->desc[i].sz;
|
||||||
/* calculate number of packets and add those many headers */
|
/* calculate number of packets and add those many headers */
|
||||||
total_sz += (u64)(((tx_info->desc[i].sz / ch->desc_sz) + 1) * 30);
|
total_sz += (u64)(((tx_info->desc[i].sz / ch->desc_sz) + 1) * 30ULL);
|
||||||
total_sz += tx_info->desc[i].sz;
|
total_sz += tx_info->desc[i].sz;
|
||||||
dma_ll_virt->sar_low = lower_32_bits(tx_info->desc[i].src);
|
dma_ll_virt->sar_low = lower_32_bits(tx_info->desc[i].src);
|
||||||
dma_ll_virt->sar_high = upper_32_bits(tx_info->desc[i].src);
|
dma_ll_virt->sar_high = upper_32_bits(tx_info->desc[i].src);
|
||||||
|
|||||||
Reference in New Issue
Block a user