All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	rayagonda.kokatanur@broadcom.com, li.jin@broadcom.com,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [PATCH v2 2/2] pinctrl: iproc: use unique name for irq chip
Date: Mon, 7 Oct 2019 09:30:50 +0200	[thread overview]
Message-ID: <CAMuHMdV7syxxtnHEcgFBrf5DLo-M_71tZFWHHQ6kTO=2A1eVhg@mail.gmail.com> (raw)
In-Reply-To: <20191003000310.17099-3-chris.packham@alliedtelesis.co.nz>

Hi Chris,

CC MarcZ

On Thu, Oct 3, 2019 at 2:03 AM Chris Packham
<chris.packham@alliedtelesis.co.nz> 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 <chris.packham@alliedtelesis.co.nz>

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?

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

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Scott Branden <sbranden@broadcom.com>,
	rayagonda.kokatanur@broadcom.com, Ray Jui <rjui@broadcom.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	bcm-kernel-feedback-list@broadcom.com,
	Marc Zyngier <maz@kernel.org>,
	li.jin@broadcom.com,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 2/2] pinctrl: iproc: use unique name for irq chip
Date: Mon, 7 Oct 2019 09:30:50 +0200	[thread overview]
Message-ID: <CAMuHMdV7syxxtnHEcgFBrf5DLo-M_71tZFWHHQ6kTO=2A1eVhg@mail.gmail.com> (raw)
In-Reply-To: <20191003000310.17099-3-chris.packham@alliedtelesis.co.nz>

Hi Chris,

CC MarcZ

On Thu, Oct 3, 2019 at 2:03 AM Chris Packham
<chris.packham@alliedtelesis.co.nz> 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 <chris.packham@alliedtelesis.co.nz>

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?

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-10-07  7:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03  0:03 [PATCH v2 0/2] pinctrl: iproc: improve error handling Chris Packham
2019-10-03  0:03 ` Chris Packham
2019-10-03  0:03 ` [PATCH v2 1/2] pinctrl: iproc: allow for error from platform_get_irq() Chris Packham
2019-10-03  0:03   ` Chris Packham
2019-10-03 18:36   ` Scott Branden
2019-10-03 18:36     ` Scott Branden
2019-10-05 16:35   ` Linus Walleij
2019-10-05 16:35     ` Linus Walleij
2019-10-03  0:03 ` [PATCH v2 2/2] pinctrl: iproc: use unique name for irq chip Chris Packham
2019-10-03  0:03   ` Chris Packham
2019-10-03 18:36   ` Scott Branden
2019-10-03 18:36     ` Scott Branden
2019-10-05 16:37   ` Linus Walleij
2019-10-05 16:37     ` Linus Walleij
2019-10-07  7:30   ` Geert Uytterhoeven [this message]
2019-10-07  7:30     ` Geert Uytterhoeven
2019-10-07  8:14     ` Marc Zyngier
2019-10-07  8:14       ` Marc Zyngier
2019-10-07 17:10       ` Scott Branden
2019-10-07 17:10         ` Scott Branden
2019-10-13 21:02         ` Chris Packham
2019-10-13 21:02           ` Chris Packham
2019-10-11  7:26       ` Linus Walleij
2019-10-11  7:26         ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdV7syxxtnHEcgFBrf5DLo-M_71tZFWHHQ6kTO=2A1eVhg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=li.jin@broadcom.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.