Skip to content

Commit dac5187

Browse files
committed
Merge tag 'm68k-for-v5.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k fix from Geert Uytterhoeven: "Fix virt_addr_valid() W=1 compiler warnings. This is a single non-critical fix. As the build bots are now testing all new code with W=1, these warnings are popping up everywhere, confusing people. Hence I think it makes sense to silence it as soon as possible" * tag 'm68k-for-v5.12-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Fix virt_addr_valid() W=1 compiler warnings
2 parents a38fd87 + a65a802 commit dac5187

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

arch/m68k/include/asm/page_mm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
171171
#include <asm-generic/memory_model.h>
172172
#endif
173173

174-
#define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
174+
#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
175175
#define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
176176

177177
#endif /* __ASSEMBLY__ */

arch/m68k/include/asm/page_no.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ extern unsigned long memory_end;
3030
#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
3131
#define pfn_valid(pfn) ((pfn) < max_mapnr)
3232

33-
#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
34-
((void *)(kaddr) < (void *)memory_end))
33+
#define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET) && \
34+
((unsigned long)(kaddr) < memory_end))
3535

3636
#endif /* __ASSEMBLY__ */
3737

0 commit comments

Comments
 (0)