Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/85xx: fix build warning, remove silly cast

This fixes a build warning when PHYS_64BIT is enabled, and removes an
unnecessary cast to phys_addr_t (the variable being cast is already
a phys_addr_t)

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Becky Bruce and committed by
Kumar Gala
82331ab1 307db958

+3 -2
+3 -2
arch/powerpc/mm/fsl_booke_mmu.c
··· 202 202 cam_max_size = max_lowmem_size; 203 203 204 204 /* adjust lowmem size to max_lowmem_size */ 205 - ram = min(max_lowmem_size, (phys_addr_t)total_lowmem); 205 + ram = min(max_lowmem_size, total_lowmem); 206 206 207 207 /* Calculate CAM values */ 208 208 __cam0 = 1UL << 2 * (__ilog2(ram) / 2); ··· 225 225 printk(KERN_INFO "Memory CAM mapping: CAM0=%ldMb, CAM1=%ldMb," 226 226 " CAM2=%ldMb residual: %ldMb\n", 227 227 __cam0 >> 20, __cam1 >> 20, __cam2 >> 20, 228 - (total_lowmem - __cam0 - __cam1 - __cam2) >> 20); 228 + (long int)((total_lowmem - __cam0 - __cam1 - __cam2) 229 + >> 20)); 229 230 __max_low_memory = __cam0 + __cam1 + __cam2; 230 231 __initial_memory_limit_addr = memstart_addr + __max_low_memory; 231 232 }