Skip to content

Commit

Permalink
Merge tag 'm68k-for-v5.12-tag2' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Mar 7, 2021
2 parents a38fd87 + a65a802 commit dac5187
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/m68k/include/asm/page_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static inline __attribute_const__ int __virt_to_node_shift(void)
#include <asm-generic/memory_model.h>
#endif

#define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
#define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))

#endif /* __ASSEMBLY__ */
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/include/asm/page_no.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ extern unsigned long memory_end;
#define page_to_pfn(page) virt_to_pfn(page_to_virt(page))
#define pfn_valid(pfn) ((pfn) < max_mapnr)

#define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
((void *)(kaddr) < (void *)memory_end))
#define virt_addr_valid(kaddr) (((unsigned long)(kaddr) >= PAGE_OFFSET) && \
((unsigned long)(kaddr) < memory_end))

#endif /* __ASSEMBLY__ */

Expand Down

0 comments on commit dac5187

Please sign in to comment.