[PATCH] 85xx: fix build warning, remove silly cast

Subsystems: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

STALE6640d

2 messages, 2 authors, 2008-08-21 · open the first message on its own page

[PATCH] 85xx: fix build warning, remove silly cast

From: Becky Bruce <hidden>
Date: 2008-08-21 18:50:30

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 <redacted>
---
 arch/powerpc/mm/fsl_booke_mmu.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index ce10e2b..23cee39 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -202,7 +202,7 @@ adjust_total_lowmem(void)
 		cam_max_size = max_lowmem_size;
 
 	/* adjust lowmem size to max_lowmem_size */
-	ram = min(max_lowmem_size, (phys_addr_t)total_lowmem);
+	ram = min(max_lowmem_size, total_lowmem);
 
 	/* Calculate CAM values */
 	__cam0 = 1UL << 2 * (__ilog2(ram) / 2);
@@ -225,7 +225,8 @@ adjust_total_lowmem(void)
 	printk(KERN_INFO "Memory CAM mapping: CAM0=%ldMb, CAM1=%ldMb,"
 			" CAM2=%ldMb residual: %ldMb\n",
 			__cam0 >> 20, __cam1 >> 20, __cam2 >> 20,
-			(total_lowmem - __cam0 - __cam1 - __cam2) >> 20);
+			(long int)((total_lowmem - __cam0 - __cam1 - __cam2)
+				   >> 20));
 	__max_low_memory = __cam0 + __cam1 + __cam2;
 	__initial_memory_limit_addr = memstart_addr + __max_low_memory;
 }
-- 
1.5.5.1

Re: [PATCH] 85xx: fix build warning, remove silly cast

From: Kumar Gala <hidden>
Date: 2008-08-21 19:58:22

On Aug 21, 2008, at 1:50 PM, Becky Bruce wrote:
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 <redacted>
---
arch/powerpc/mm/fsl_booke_mmu.c |    5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
applied to powerpc-next.

- k
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help