diff options
author | Xianzhong <xianzhong.li@nxp.com> | 2020-10-28 09:32:15 +0800 |
---|---|---|
committer | Xianzhong <xianzhong.li@nxp.com> | 2020-10-28 10:17:00 +0800 |
commit | 9707e39f1b01eeb2c3b1b2fc63f347ae246c1660 (patch) | |
tree | efff505229e608e6e3e59890bfef410e31fc02d8 /drivers/mxc | |
parent | 4b01de37e58b5e9bef6816cad870eddfa9eb7792 (diff) |
MGS-5990-4 [#ccc] fix the uninitialized variable
shall use the Bytes variable instead of heapBytes,
also fix bankSize assignment from heapBytes.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Diffstat (limited to 'drivers/mxc')
-rw-r--r-- | drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c index 9728ade332fa..9d07f17aceef 100644 --- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c +++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_video_memory.c @@ -276,7 +276,7 @@ gckVIDMEM_Construct( if (BankSize == 0) { /* set two banks in 16:1 */ - BankSize = heapBytes >> 4; + BankSize = Bytes >> 4; } gcmkSAFECASTSIZET(heapBytes, Bytes); @@ -370,15 +370,15 @@ gckVIDMEM_Construct( /* Mark sentinel. */ memory->sentinel[i].VidMem.bytes = 0; - /* Adjust address for next bank. */ - base += bytes; - heapBytes -= bytes; - banks ++; - if (bankSize == (heapBytes >> 4)) { bankSize = heapBytes; } + + /* Adjust address for next bank. */ + base += bytes; + heapBytes -= bytes; + banks ++; } /* Assign all the bank mappings. */ |