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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 A7364C433E6 for ; Tue, 9 Feb 2021 12:36:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5EE3764E88 for ; Tue, 9 Feb 2021 12:36:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbhBIMgu (ORCPT ); Tue, 9 Feb 2021 07:36:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbhBIMgs (ORCPT ); Tue, 9 Feb 2021 07:36:48 -0500 Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::606]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90C98C061786; Tue, 9 Feb 2021 04:36:08 -0800 (PST) Received: from sas1-43b74f7725b7.qloud-c.yandex.net (sas1-43b74f7725b7.qloud-c.yandex.net [IPv6:2a02:6b8:c14:391a:0:640:43b7:4f77]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 4F7BF5F80186; Tue, 9 Feb 2021 15:35:59 +0300 (MSK) Received: from sas1-e20a8b944cac.qloud-c.yandex.net (sas1-e20a8b944cac.qloud-c.yandex.net [2a02:6b8:c14:6696:0:640:e20a:8b94]) by sas1-43b74f7725b7.qloud-c.yandex.net (mxback/Yandex) with ESMTP id GelvmXSRRD-ZxH0gjER; Tue, 09 Feb 2021 15:35:59 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1612874159; bh=Wc4fzS9kWMCQeIC8ECmYVoAUo+upjBZ8ebEELfikIaY=; h=In-Reply-To:Subject:To:From:Message-ID:Cc:References:Date; b=cLGYZVdsPsW+zKYxVhhcAzXcupsL1vjKMbUfXE0aG99LmYHNe4xIOc64QsLk6NoPr f/PTHI5LqVRP+wVbBBI3s4rbbcJ5bpvakE3q5ECKEin6K4wYI8QJJvPMBdFR06lnOa QrZQXIF7dNpK7kSUleGOcwERlE3YQVUTgSJHD9fA= Authentication-Results: sas1-43b74f7725b7.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Received: by sas1-e20a8b944cac.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id S7EuFwtpNv-ZwneF2GY; Tue, 09 Feb 2021 15:35:58 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Nikita Shubin To: Andy Shevchenko Cc: Linus Walleij , Bartosz Golaszewski , Alexander Sverdlin , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Subject: Re: [PATCH v5 2/7] gpio: ep93xx: Fix single irqchip with multi gpiochips Date: Tue, 09 Feb 2021 15:33:56 +0300 Message-ID: <5450294.DvuYhMxLoT@redslave> In-Reply-To: References: <20210208085954.30050-1-nikita.shubin@maquefel.me> <20210208085954.30050-3-nikita.shubin@maquefel.me> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Andy. On Monday, 8 February 2021 16:20:17 MSK Andy Shevchenko wrote: >On Mon, Feb 8, 2021 at 11:00 AM Nikita Shubin wrote: >> Fixes the following warnings which results in interrupts disabled on >> port B/F: >> >> gpio gpiochip1: (B): detected irqchip that is shared with multiple >> gpiochips: please fix the driver. gpio gpiochip5: (F): detected >> irqchip that is shared with multiple gpiochips: please fix the >> driver. >> >> - added separate irqchip for each interrupt capable gpiochip >> - provided unique names for each irqchip > >... > >> +static void ep93xx_init_irq_chip(struct device *dev, struct irq_chip >> *ic, const char *label) +{ >> >> + ic->name = devm_kasprintf(dev, GFP_KERNEL, "gpio-irq-%s", >> label); >Is the label being NULL okay? The label is taken from ep93xx_gpio_banks[], so unless we explicitly pass zero to ep93xx_init_irq_chip(), we are ok. > >> + ic->irq_ack = ep93xx_gpio_irq_ack; >> + ic->irq_mask_ack = ep93xx_gpio_irq_mask_ack; >> + ic->irq_mask = ep93xx_gpio_irq_mask; >> + ic->irq_unmask = ep93xx_gpio_irq_unmask; >> + ic->irq_set_type = ep93xx_gpio_irq_type; >> +} > >... > >> - girq->chip = &ep93xx_gpio_irq_chip; > >I don't see where you remove that static structure. Good catch - thank you very much, also i noticed that i forgot to switch IRQ chip in irq_set_chip_and_handler() for port F.