Skip to content

Commit 95486e4

Browse files
committed
MIPS: Fix flood of warnings about comparsion being always true.
./arch/mips/include/asm/page.h:204:13: warning: comparison of unsigned expression &gt;= 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 <[email protected]>
1 parent 8005c49 commit 95486e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/mips/include/asm/page.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ static inline int pfn_valid(unsigned long pfn)
200200
{
201201
/* avoid <linux/mm.h> include hell */
202202
extern unsigned long max_mapnr;
203+
unsigned long pfn_offset = ARCH_PFN_OFFSET;
203204

204-
return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr;
205+
return pfn >= pfn_offset && pfn < max_mapnr;
205206
}
206207

207208
#elif defined(CONFIG_SPARSEMEM)

0 commit comments

Comments
 (0)