linux-stable/arch/m68k
Finn Thain a7b5458ce7 m68k: Fix WARNING splat in pmac_zilog driver
Don't add platform resources that won't be used. This avoids a
recently-added warning from the driver core, that can show up on a
multi-platform kernel when !MACH_IS_MAC.

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at drivers/base/platform.c:224 platform_get_irq_optional+0x8e/0xce
0 is an invalid IRQ number
Modules linked in:
CPU: 0 PID: 0 Comm: swapper Not tainted 5.9.0-multi #1
Stack from 004b3f04:
        004b3f04 00462c2f 00462c2f 004b3f20 0002e128 004754db 004b6ad4 004b3f4c
        0002e19c 004754f7 000000e0 00285ba0 00000009 00000000 004b3f44 ffffffff
        004754db 004b3f64 004b3f74 00285ba0 004754f7 000000e0 00000009 004754db
        004fdf0c 005269e2 004fdf0c 00000000 004b3f88 00285cae 004b6964 00000000
        004fdf0c 004b3fac 0051cc68 004b6964 00000000 004b6964 00000200 00000000
        0051cc3e 0023c18a 004b3fc0 0051cd8a 004fdf0c 00000002 0052b43c 004b3fc8
Call Trace: [<0002e128>] __warn+0xa6/0xd6
 [<0002e19c>] warn_slowpath_fmt+0x44/0x76
 [<00285ba0>] platform_get_irq_optional+0x8e/0xce
 [<00285ba0>] platform_get_irq_optional+0x8e/0xce
 [<00285cae>] platform_get_irq+0x12/0x4c
 [<0051cc68>] pmz_init_port+0x2a/0xa6
 [<0051cc3e>] pmz_init_port+0x0/0xa6
 [<0023c18a>] strlen+0x0/0x22
 [<0051cd8a>] pmz_probe+0x34/0x88
 [<0051cde6>] pmz_console_init+0x8/0x28
 [<00511776>] console_init+0x1e/0x28
 [<0005a3bc>] printk+0x0/0x16
 [<0050a8a6>] start_kernel+0x368/0x4ce
 [<005094f8>] _sinittext+0x4f8/0xc48
random: get_random_bytes called from print_oops_end_marker+0x56/0x80 with crng_init=0
---[ end trace 392d8e82eed68d6c ]---

Commit a85a6c86c2 ("driver core: platform: Clarify that IRQ 0 is invalid"),
which introduced the WARNING, suggests that testing for irq == 0 is
undesirable. Instead of that comparison, just test for resource existence.

Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Joshua Thompson <funaho@jurai.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: stable@vger.kernel.org # v5.8+
Reported-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Link: https://lore.kernel.org/r/0c0fe1e4f11ccec202d4df09ea7d9d98155d101a.1606001297.git.fthain@telegraphics.com.au
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-11-23 11:31:00 +01:00
..
68000 mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
amiga m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
apollo m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
atari m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
bvme6000 m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
coldfire m68knommu: include SDHC support only when hardware has it 2020-10-05 21:51:31 +10:00
configs m68k: defconfig: Enable KUnit tests 2020-11-16 10:58:39 +01:00
emu block: move ->make_request_fn to struct block_device_operations 2020-07-01 07:27:24 -06:00
fpsp040
hp300 m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
ifpsp060
include m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
kernel m68k: Add a missing ELF_DETAILS in link script 2020-11-23 11:31:00 +01: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 m68k: Fix WARNING splat in pmac_zilog driver 2020-11-23 11:31:00 +01:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 74 2019-05-24 17:36:47 +02:00
mm m68k updates for v5.10 2020-10-12 10:10:56 -07:00
mvme16x m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
mvme147 m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
q40 m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
sun3 m68k: sun3: Descend to prom from arch/m68k/sun3 2020-07-13 11:39:12 +02:00
sun3x m68k: Remove unused mach_max_dma_address 2020-11-02 12:05:21 +01:00
tools/amiga m68k: tools: Replace zero-length array with flexible-array member 2020-05-25 10:55:56 +02:00
install.sh
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 treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09: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 m68k: mac: Update Kconfig help 2020-11-23 11:30:58 +01:00
Makefile kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00