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.