From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DC08C433E1 for ; Mon, 13 Jul 2020 03:04:01 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63EFA206B6 for ; Mon, 13 Jul 2020 03:04:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Q3lOwYHm"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="sx3PcbYw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63EFA206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KLi2GLxHI1e050Hmwd9wYkL+da3/jrLUvch1VSjAnxA=; b=Q3lOwYHm8iD2YUhvjsVxNY4ij Di82Jvpnhv+R26zsOZ4LGSfZGQ5VpGwRojCP1v5QumxxbhesmZ3qjEp8SsQzo30B4dr7i1JiCbapA NQ2/QoyehYlMmq1wqcYr1beZQrvH5Gd1k0qNJhmX7sXo2WOz7jSEQinPB2yea9FH+FC89H4lVjWuR V6pk4LO5lv7u6lU9VK8rLa12iaIO5zBXCDJCNyE2nAhz1VstczsclJ+XBsqEUAE4hUpUPbf9gAT5W WSdvvfGJ+qT0nRVPrDZ0g7KRiJBVBdbjRQxYVE0QMCdITGPc/08LwJAZ0SJPM4xVZfWrJCGYFFFa1 lEoxqeiDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1juojp-0008IX-IW; Mon, 13 Jul 2020 03:02:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1juojn-0008Hv-KM for linux-arm-kernel@lists.infradead.org; Mon, 13 Jul 2020 03:02:40 +0000 Received: from dragon (80.251.214.228.16clouds.com [80.251.214.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9469B206B6; Mon, 13 Jul 2020 03:02:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594609358; bh=A6MPJdy59dkFtPa9jX+vGeKW7O3CRBwsu/PGmPjn/m8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sx3PcbYwo+zXw2RRuF8lp9DRqlIbxefoNHvUhg3JrzbmOc7KUM66c//BUPPIjKXpD aaD8pLeI6enKfN/RguUjg6kOwmv9IXQzolScyTx+RbpP4kLIHcHgmpMmWRNVklT5dB S/QmUy+IarrpW8gny58ZmeiHR6XaZ4EuSC3qt5aM= Date: Mon, 13 Jul 2020 11:02:33 +0800 From: Shawn Guo To: Guenter Roeck Subject: Re: [PATCH] imx: Provide correct number of resources when registering gpio devices Message-ID: <20200713030232.GA21277@dragon> References: <20200701032651.12420-1-linux@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200701032651.12420-1-linux@roeck-us.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200712_230239_789004_23F9D5C2 X-CRM114-Status: GOOD ( 14.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sascha Hauer , Russell King , linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Bjorn Helgaas , Fabio Estevam , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 30, 2020 at 08:26:51PM -0700, Guenter Roeck wrote: > Since commit a85a6c86c25be ("driver core: platform: Clarify that IRQ 0 is > invalid"), the kernel is a bit touchy when it encounters interrupt 0. > As a result, there are lots of warnings such as the following when booting > systems such as 'kzm'. > > WARNING: CPU: 0 PID: 1 at drivers/base/platform.c:224 platform_get_irq_optional+0x118/0x128 > 0 is an invalid IRQ number > Modules linked in: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc3 #1 > Hardware name: Kyoto Microcomputer Co., Ltd. KZM-ARM11-01 > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0xe8/0x120) > [] (dump_stack) from [] (__warn+0xe4/0x108) > [] (__warn) from [] (warn_slowpath_fmt+0x74/0xbc) > [] (warn_slowpath_fmt) from [] (platform_get_irq_optional+0x118/0x128) > [] (platform_get_irq_optional) from [] (platform_irq_count+0x20/0x3c) > [] (platform_irq_count) from [] (mxc_gpio_probe+0x8c/0x494) > [] (mxc_gpio_probe) from [] (platform_drv_probe+0x48/0x98) > [] (platform_drv_probe) from [] (really_probe+0x214/0x344) > [] (really_probe) from [] (driver_probe_device+0x58/0xb4) > [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) > [] (device_driver_attach) from [] (__driver_attach+0x84/0xc0) > [] (__driver_attach) from [] (bus_for_each_dev+0x78/0xb8) > [] (bus_for_each_dev) from [] (bus_add_driver+0x154/0x1e0) > [] (bus_add_driver) from [] (driver_register+0x74/0x108) > [] (driver_register) from [] (do_one_initcall+0x80/0x3b4) > [] (do_one_initcall) from [] (kernel_init_freeable+0x170/0x208) > [] (kernel_init_freeable) from [] (kernel_init+0x8/0x11c) > [] (kernel_init) from [] (ret_from_fork+0x14/0x20) > > As it turns out, mxc_register_gpio() is a bit lax when setting the > number of resources: it registers a resource with interrupt 0 when in > reality there is no such interrupt. Fix the problem by not declaring > the second interrupt resource if there is no second interrupt. > > Fixes: a85a6c86c25be ("driver core: platform: Clarify that IRQ 0 is invalid") > Cc: Bjorn Helgaas > Signed-off-by: Guenter Roeck I changed the subject prefix to 'ARM: imx: ...' and applied the patch. Shawn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel