2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00

MIPS: Fix flood of warnings about comparsion being always true.

./arch/mips/include/asm/page.h:204:13: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

The default value of ARCH_PFN_OFFSET is 0 thus triggering this warning
for all platforms using the default value.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Ralf Baechle 2015-11-16 12:07:10 +01:00
parent 8005c49d9a
commit 95486e4979

View File

@ -200,8 +200,9 @@ static inline int pfn_valid(unsigned long pfn)
{ {
/* avoid <linux/mm.h> include hell */ /* avoid <linux/mm.h> include hell */
extern unsigned long max_mapnr; extern unsigned long max_mapnr;
unsigned long pfn_offset = ARCH_PFN_OFFSET;
return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr; return pfn >= pfn_offset && pfn < max_mapnr;
} }
#elif defined(CONFIG_SPARSEMEM) #elif defined(CONFIG_SPARSEMEM)