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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS 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 A942AC47404 for ; Mon, 7 Oct 2019 08:14:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B1FF20867 for ; Mon, 7 Oct 2019 08:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570436085; bh=zkZeNn2p4QwOzYPYGSMsQ6sbzPhcS7MdkgA8k3K/rlI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=n103uaZpMrgFKnMljGTEmsqGFRW/UeKtRX+g16BqtR4yZhfJIKzHLRGQPO72eOHXH fdnwgdoE4zPZwtGO18O51SLIiU+Oz6oeKSB6AzrdhoipOx/uMpo5tBqtE6dLNVIfmn KsZVF0DfaFw0p2a61GS8e+PaUbxS8Se1SBQxNXPw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727028AbfJGIOp (ORCPT ); Mon, 7 Oct 2019 04:14:45 -0400 Received: from inca-roads.misterjones.org ([213.251.177.50]:39373 "EHLO inca-roads.misterjones.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbfJGIOo (ORCPT ); Mon, 7 Oct 2019 04:14:44 -0400 Received: from [82.98.7.229] (helo=big-swifty.misterjones.org) by cheepnis.misterjones.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1iHOAB-00052F-KV; Mon, 07 Oct 2019 10:14:39 +0200 Date: Mon, 07 Oct 2019 09:14:38 +0100 Message-ID: <86blutdlap.wl-maz@kernel.org> From: Marc Zyngier To: Geert Uytterhoeven Cc: Chris Packham , Linus Walleij , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, rayagonda.kokatanur@broadcom.com, li.jin@broadcom.com, "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Linux ARM Subject: Re: [PATCH v2 2/2] pinctrl: iproc: use unique name for irq chip In-Reply-To: References: <20191003000310.17099-1-chris.packham@alliedtelesis.co.nz> <20191003000310.17099-3-chris.packham@alliedtelesis.co.nz> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 82.98.7.229 X-SA-Exim-Rcpt-To: geert@linux-m68k.org, chris.packham@alliedtelesis.co.nz, linus.walleij@linaro.org, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, rayagonda.kokatanur@broadcom.com, li.jin@broadcom.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, 07 Oct 2019 08:30:50 +0100, Geert Uytterhoeven wrote: > > Hi Chris, > > CC MarcZ > > On Thu, Oct 3, 2019 at 2:03 AM Chris Packham > wrote: > > Use the dev_name(dev) for the irqc->name so that we get unique names > > when we have multiple instances of this driver. > > > > Signed-off-by: Chris Packham > > A while ago, Marc Zyngier pointed out that the irq_chip .name field > should contain the device's class name, not the instance's name. > Hence the current code is correct? Thanks Geert for looping me in. The main reasons why I oppose this kind of "let's show as much information as we can in /proc/interrupts" are: - It clutters the output badly: the formatting of this file, which is bad enough when you have a small number of CPUs, becomes unreadable when you have a large number of them *and* stupidly long strings that only make sense on a given platform. - Like it or not, /proc is ABI. We don't change things randomly there without a good reason, and debugging isn't one of them. - Debug information belongs to debugfs, where we already have plenty of stuff (see CONFIG_GENERIC_IRQ_DEBUGFS). I'd rather we improve this infrastructure if needed, rather than add platform specific hacks. Thanks, M. > > See also "[PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent" > (https://lore.kernel.org/lkml/20190607095858.10028-1-geert+renesas@glider.be/) > Note that the irqchip patches in that series have been applied; the gpio > patches haven't been applied yet. > > > --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > > +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > > @@ -858,7 +858,7 @@ static int iproc_gpio_probe(struct platform_device *pdev) > > struct gpio_irq_chip *girq; > > > > irqc = &chip->irqchip; > > - irqc->name = "bcm-iproc-gpio"; > > + irqc->name = dev_name(dev); > > irqc->irq_ack = iproc_gpio_irq_ack; > > irqc->irq_mask = iproc_gpio_irq_mask; > > irqc->irq_unmask = iproc_gpio_irq_unmask; > > 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 > -- Jazz is not dead, it just smells funny. 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=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 7AD95C4740A for ; Mon, 7 Oct 2019 08:14:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4EAA620679 for ; Mon, 7 Oct 2019 08:14:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XlcHyZS3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EAA620679 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+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OzGrjjxiK8XfzvseldaxLF6SNaEpq5BIDr2K9U7HXd0=; b=XlcHyZS3evLpxt t5M3+417O/mwFGv3pmrJwDWw3bBo/7aZ7VXMJcZMCVFgwjVo/nhUcjPwVmXIKjFFsDUyU/dy3dB8Y o7/iX9INvl+Lf6X9NBW0rLaphfGItN2xG6ppc7Qg2Vz29/DRW3HnisStzpghSdWXqGW8Igubkdjan 5o/nfYLDWM8TUXnDx1CXXNqZ7pfb9Sz1U6PO97mVIvfKEubFP19cdBj90ixjivr+Xt1rbpmGd9vHF Vsk9JsVZoLC0zLOf07T1P1dw3cqGHE8F/YTF72GBzDT1ES0hsXfDtCRYHntuiVl+lVcTdkR+IQBW1 LdOBjEW0UeSdft+pCMOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHOAM-0001Sh-JG; Mon, 07 Oct 2019 08:14:50 +0000 Received: from inca-roads.misterjones.org ([213.251.177.50]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHOAI-0001Rv-VA for linux-arm-kernel@lists.infradead.org; Mon, 07 Oct 2019 08:14:48 +0000 Received: from [82.98.7.229] (helo=big-swifty.misterjones.org) by cheepnis.misterjones.org with esmtpsa (TLSv1.2:AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1iHOAB-00052F-KV; Mon, 07 Oct 2019 10:14:39 +0200 Date: Mon, 07 Oct 2019 09:14:38 +0100 Message-ID: <86blutdlap.wl-maz@kernel.org> From: Marc Zyngier To: Geert Uytterhoeven Subject: Re: [PATCH v2 2/2] pinctrl: iproc: use unique name for irq chip In-Reply-To: References: <20191003000310.17099-1-chris.packham@alliedtelesis.co.nz> <20191003000310.17099-3-chris.packham@alliedtelesis.co.nz> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 82.98.7.229 X-SA-Exim-Rcpt-To: geert@linux-m68k.org, chris.packham@alliedtelesis.co.nz, linus.walleij@linaro.org, rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, rayagonda.kokatanur@broadcom.com, li.jin@broadcom.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191007_011447_150378_065762A6 X-CRM114-Status: GOOD ( 20.19 ) 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: Scott Branden , rayagonda.kokatanur@broadcom.com, Ray Jui , Linus Walleij , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Chris Packham , bcm-kernel-feedback-list@broadcom.com, li.jin@broadcom.com, Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 07 Oct 2019 08:30:50 +0100, Geert Uytterhoeven wrote: > > Hi Chris, > > CC MarcZ > > On Thu, Oct 3, 2019 at 2:03 AM Chris Packham > wrote: > > Use the dev_name(dev) for the irqc->name so that we get unique names > > when we have multiple instances of this driver. > > > > Signed-off-by: Chris Packham > > A while ago, Marc Zyngier pointed out that the irq_chip .name field > should contain the device's class name, not the instance's name. > Hence the current code is correct? Thanks Geert for looping me in. The main reasons why I oppose this kind of "let's show as much information as we can in /proc/interrupts" are: - It clutters the output badly: the formatting of this file, which is bad enough when you have a small number of CPUs, becomes unreadable when you have a large number of them *and* stupidly long strings that only make sense on a given platform. - Like it or not, /proc is ABI. We don't change things randomly there without a good reason, and debugging isn't one of them. - Debug information belongs to debugfs, where we already have plenty of stuff (see CONFIG_GENERIC_IRQ_DEBUGFS). I'd rather we improve this infrastructure if needed, rather than add platform specific hacks. Thanks, M. > > See also "[PATCH 0/4] irqchip: renesas: Use proper irq_chip name and parent" > (https://lore.kernel.org/lkml/20190607095858.10028-1-geert+renesas@glider.be/) > Note that the irqchip patches in that series have been applied; the gpio > patches haven't been applied yet. > > > --- a/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > > +++ b/drivers/pinctrl/bcm/pinctrl-iproc-gpio.c > > @@ -858,7 +858,7 @@ static int iproc_gpio_probe(struct platform_device *pdev) > > struct gpio_irq_chip *girq; > > > > irqc = &chip->irqchip; > > - irqc->name = "bcm-iproc-gpio"; > > + irqc->name = dev_name(dev); > > irqc->irq_ack = iproc_gpio_irq_ack; > > irqc->irq_mask = iproc_gpio_irq_mask; > > irqc->irq_unmask = iproc_gpio_irq_unmask; > > 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 > -- Jazz is not dead, it just smells funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel