1
0
Fork 0
alistair23-linux/arch/m68k
Geert Uytterhoeven a65a802aad m68k: Fix virt_addr_valid() W=1 compiler warnings
If CONFIG_DEBUG_SG=y, and CONFIG_MMU=y:

    include/linux/scatterlist.h: In function ‘sg_set_buf’:
    arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
      174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
	  |                                                 ^~

or CONFIG_MMU=n:

    include/linux/scatterlist.h: In function ‘sg_set_buf’:
    arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
       33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
	  |                                                  ^~

Fix this by doing the comparison in the "unsigned long" instead of the
"void *" domain.

Note that for now this is only seen when compiling btrfs, due to commit
e9aa7c285d ("btrfs: enable W=1 checks for btrfs"), but as people
are doing more W=1 compile testing, it will start to show up elsewhere,
too.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Link: https://lore.kernel.org/r/20210305084122.4118826-1-geert@linux-m68k.org
2021-03-06 14:15:07 +01:00
..
68000 Fixes include: 2020-12-21 10:35:11 -08:00
amiga asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
apollo asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
atari asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
bvme6000 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
coldfire m68k: let clk_enable() return immediately if clk is NULL 2021-02-08 08:15:17 +10:00
configs m68k: defconfig: Update defconfigs for v5.11-rc1 2021-01-25 13:23:38 +01:00
emu block: store a block_device pointer in struct bio 2021-01-24 18:17:20 -07:00
fpsp040 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hp300 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
ifpsp060 scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
include m68k: Fix virt_addr_valid() W=1 compiler warnings 2021-03-06 14:15:07 +01:00
kernel io_uring-worker.v3-2021-02-25 2021-02-27 08:29:02 -08:00
lib m68k: get rid of zeroing destination on error in csum_and_copy_from_user() 2020-08-20 15:45:17 -04:00
mac asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 74 2019-05-24 17:36:47 +02:00
mm m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM 2020-12-15 12:13:43 -08:00
mvme16x asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
mvme147 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
q40 asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
sun3 m68k: remove timer_interrupt() function 2020-10-30 21:57:06 +01:00
sun3x asm-generic: cross-architecture timer cleanup 2020-12-16 00:07:17 -08:00
tools/amiga m68k: tools: Replace zero-length array with flexible-array member 2020-05-25 10:55:56 +02:00
Kbuild m68k: sun3: Descend to prom from arch/m68k/sun3 2020-07-13 11:39:12 +02:00
Kconfig Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
Kconfig.bus m68k: Fix Kconfig indentation 2020-03-09 11:12:19 +01:00
Kconfig.cpu Fixes include: 2020-12-21 10:35:11 -08:00
Kconfig.debug m68k: Fix Kconfig indentation 2020-03-09 11:12:19 +01:00
Kconfig.devices treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig.machine Fixes include: 2020-12-21 10:35:11 -08:00
Makefile kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00