rb532: do not use phys_t
PATCH 1/1 rb532: do not use phys_t
MIPS include types.h says that using phys_t is bad, which in fact is an unsigned long, so use an unsigned long directly.
Signed-off-by Florian Fainelli <[email protected]>
---
arch/mips/rb532/prom.c +2 -2
@@ -123,8 +123,8 @@ void __init prom_setup_cmdline(void)void __init prom_init (void ) {struct ddr_ram __iomem *ddr; -phys_t memsize; -phys_t ddrbase; +unsigned long memsize; +unsigned long ddrbase; ddr =ioremap_nocache (ddr_reg[0 ].start, ddr_reg[0 ].end - ddr_reg[0 ].start);
Quoted 2 lines · Florian Fainelli
MIPS include
types.hsays that usingphys_tis bad, which in fact is an unsigned long, so use an unsigned long directly.
That is bad indeed. A physical address might not fit in unsigned long.
Actually the upstream is apparently adopting phys_addr_t for this purpose right now, so you might consider waiting with your patch till the thing settles down. Note that by using a generic type you take away semantics which will make future adjustments more difficult.
Maciej