aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2019-09-12 16:10:29 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2019-09-12 16:10:29 +0000
commit88b69fccba8beda50c19c655e76ecc527dd162ea (patch)
tree85e00bc01fe755399a6d3d42ecdff361923c1fed
parentf52f73b3ee7e958f4c490168b2ad5890604cadef (diff)
parent36bf55d66c3b01970f8aff0d3c2b70c9271717b7 (diff)
downloadtrusted-firmware-a-88b69fccba8beda50c19c655e76ecc527dd162ea.tar.gz
Merge "Tegra: memctrl_v2: fix "overflow before widen" coverity issue" into integration
-rw-r--r--plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c b/plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c
index a3ef5e131..2f31906d8 100644
--- a/plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c
+++ b/plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -360,17 +361,15 @@ void tegra_memctrl_videomem_setup(uint64_t phys_base, uint32_t size_in_bytes)
if ((phys_base > vmem_end_old) || (video_mem_base > vmem_end_new)) {
tegra_clear_videomem(video_mem_base,
- (uint32_t)video_mem_size_mb << 20U);
+ video_mem_size_mb << 20U);
} else {
if (video_mem_base < phys_base) {
non_overlap_area_size = phys_base - video_mem_base;
- tegra_clear_videomem(video_mem_base,
- (uint32_t)non_overlap_area_size);
+ tegra_clear_videomem(video_mem_base, non_overlap_area_size);
}
if (vmem_end_old > vmem_end_new) {
non_overlap_area_size = vmem_end_old - vmem_end_new;
- tegra_clear_videomem(vmem_end_new,
- (uint32_t)non_overlap_area_size);
+ tegra_clear_videomem(vmem_end_new, non_overlap_area_size);
}
}