Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp651504pxu; Sun, 22 Nov 2020 23:44:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDX9SlfqsqnLbAtKj0QFXI5sR9wEh4AQ+LLPhP2pGttTv9O93cdjwGOLNy1c+/U1Iq+KRz X-Received: by 2002:a17:906:6dd6:: with SMTP id j22mr33611770ejt.255.1606117483862; Sun, 22 Nov 2020 23:44:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606117483; cv=none; d=google.com; s=arc-20160816; b=i9ELh2/hCQ5plsyveeuN75NfyDehn+UkqbC9fVCSLAEVLeriNkyrUnE9aGctGfiV6l ooxTgrNhVhCDyDdgLEJ5PU0sOZKhNDBZdBdC/OTUavPpUpv3ziomBxsP4kxwbAdoS412 lx3HTP1UbmaZfDLzeAmHsNGY6yqEoNXjSV1azNs3j13sa+qEOqs0E8h1cIPQQwIHIgT3 5fU1w4OTFJ6zU6ZGtFTviAqGaNj8RPGM5mzO9FsXi9yOQ+AaFQOP8Ujhgncwzldepg/3 VrfSnZWXVpvYbAQ/VEaFEkUBor8IMNGC9SNldZGxTQZmsce+yLocmnQ8g/I4eRvxCM+/ iVQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=v/aFWB6RaZl4bPbf4u8QBig1bHxal58mvCrDRYw2MDY=; b=NlT/zLe6LMcGAmhvROBYyq/w0TXrflXqH/GX2Rrlwa15tAcqfwppTmak9x2M4+3VG5 rnPwWGAQugijU5MUs3B2AzkUQUHviT0IMBSH+8ck6fHz0ZcpvcXL8vCVdXxMoXygVRIo R+HqALdfqaT6NQHtawygM2syqCGoXpKwr43qScH6F2cyG9MFndDct5M7UYpHdCGaiDWU V+4TGLuezv6kILNcr845MqqqzLpqlYrKPnWNyToLZlHe9e2iL5/8ELjGBs0yjfjtYrFn Buft6jcoX2uGRf5PE52P4FU8t0wxkvGKAzgTN5eX7i24waU2eE3K5KgKKnny9+Yb0KBz Eksw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si6097684edj.239.2020.11.22.23.44.21; Sun, 22 Nov 2020 23:44:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728024AbgKWHls (ORCPT + 99 others); Mon, 23 Nov 2020 02:41:48 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:33142 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbgKWHlr (ORCPT ); Mon, 23 Nov 2020 02:41:47 -0500 Received: by mail-ot1-f65.google.com with SMTP id n12so11545805otk.0; Sun, 22 Nov 2020 23:41:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v/aFWB6RaZl4bPbf4u8QBig1bHxal58mvCrDRYw2MDY=; b=tajGKBEdRIcXd5b1aWwlOD6pltPpI6iQMeVJbDnlKXtFjhg1b5xaF6nyr57psXy+Pf gH8lIoeew8gYTAa2FOYUdls1GYDubc6eXPnAi8SIhuuQeJwfxnta82/0BluY7pQmzCfY DiIT4pcWopwrGgq/AKmgr32cQu1vxXSb9vZg/k3/Ppynb2xtBKgKu4IjtrUgwoLL+tWC 9RKA+kKFBGLrUsyFEKWz04Z3rJ5IpEizwrj5zhKWwjjGXueKzptAasExvVz8DQJokHae 7bLRMdp5u5SljkBJklaG0okuInbIg+NqznucAbub+zP+IoWYzM3kX+L4jPs/iZa8fGdK 53mA== X-Gm-Message-State: AOAM531oACY0cuFpNFgq3pCkJj/iIg5DBSuuWjo1H9tbMPMcOvhJp/yI hx2McdRnyzUhq9zF7tNrqQRIlPVY6cV3mmktfxSKRvgI X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr22819280oth.250.1606117306692; Sun, 22 Nov 2020 23:41:46 -0800 (PST) MIME-Version: 1.0 References: <0c0fe1e4f11ccec202d4df09ea7d9d98155d101a.1606001297.git.fthain@telegraphics.com.au> In-Reply-To: <0c0fe1e4f11ccec202d4df09ea7d9d98155d101a.1606001297.git.fthain@telegraphics.com.au> From: Geert Uytterhoeven Date: Mon, 23 Nov 2020 08:41:35 +0100 Message-ID: Subject: Re: [PATCH v2] m68k: Fix WARNING splat in pmac_zilog driver To: Finn Thain Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Joshua Thompson , Greg Kroah-Hartman , Jiri Slaby , stable , linux-m68k , Linux Kernel Mailing List , "open list:SERIAL DRIVERS" , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 22, 2020 at 12:40 AM Finn Thain wrote: > 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 a85a6c86c25b ("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 > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Joshua Thompson > Cc: Greg Kroah-Hartman > Cc: Jiri Slaby > Cc: stable@vger.kernel.org # v5.8+ > References: commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0 is invalid") > Reported-by: Laurent Vivier > Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven i.e. will queue in the m68k for-v5.11 branch. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds