drivers: ddr: altera: Fix integer overflow during size calculation
authorNaresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Fri, 7 Mar 2025 10:28:51 +0000 (02:28 -0800)
committerTien Fong Chee <tien.fong.chee@intel.com>
Tue, 22 Apr 2025 03:47:38 +0000 (11:47 +0800)
commitc889ca7ccf9ea960d164ee8568eb44e5c2f9a46d
treec611c8028b56b636dde7ef06bcbb9f7a2981632f
parentcde0050618968aae335dfbc930641656d51ff5d0
drivers: ddr: altera: Fix integer overflow during size calculation

Data structure, dramaddrw, is defined as u32. Compiler performs
32-bit arithmetic and logic operations on this data structure. Fix
is provided to avoid integer overflow while performing shifting
operations greater than 32-bit.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
drivers/ddr/altera/sdram_soc64.c