From: Michael Walle <michael@walle.cc>
To: Andy Shevchenko <andy@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiawen Wu <jiawenwu@trustnetic.com>
Subject: Re: [PATCH] gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain()
Date: Fri, 16 Jun 2023 20:02:16 +0200 [thread overview]
Message-ID: <4b55afe91d2a704c0229340c5ea4885e@walle.cc> (raw)
In-Reply-To: <ZIxuExRypHsUejFI@smile.fi.intel.com>
Am 2023-06-16 16:13, schrieb Andy Shevchenko:
> On Fri, Jun 16, 2023 at 09:30:06AM +0200, Michael Walle wrote:
>> Up until commit 6a45b0e2589f ("gpiolib: Introduce
>> gpiochip_irqchip_add_domain()") all irq_domains were allocated
>> by gpiolib itself and thus gpiolib also takes care of freeing it.
>>
>> With gpiochip_irqchip_add_domain() a user of gpiolib can associate an
>> irq_domain with the gpio_chip. This irq_domain is not managed by
>> gpiolib and therefore must not be freed by gpiolib.
>
> With or without below nit-pick
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
>
> ...
>
>> /* Remove all IRQ mappings and delete the domain */
>> - if (gc->irq.domain) {
>> + if (!gc->irq.domain_is_ext && gc->irq.domain) {
>
> Looking at this, perhaps positive about allocation?
>
> domain_is_allocated?
I mean all domains are allocated ;)
domain_is_allocated_externally? I'm bad with short and concise
names..
-michael
next prev parent reply other threads:[~2023-06-16 18:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 7:30 [PATCH] gpiolib: Fix irq_domain resource tracking for gpiochip_irqchip_add_domain() Michael Walle
2023-06-16 13:07 ` Linus Walleij
2023-06-16 14:13 ` Andy Shevchenko
2023-06-16 18:02 ` Michael Walle [this message]
2023-06-17 14:24 ` Andy Shevchenko
2023-06-19 7:43 ` 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=4b55afe91d2a704c0229340c5ea4885e@walle.cc \
--to=michael@walle.cc \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=jiawenwu@trustnetic.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox