[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b55afe91d2a704c0229340c5ea4885e@walle.cc>
Date: Fri, 16 Jun 2023 20:02:16 +0200
From: Michael Walle <michael@...le.cc>
To: Andy Shevchenko <andy@...nel.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiawen Wu <jiawenwu@...stnetic.com>
Subject: Re: [PATCH] gpiolib: Fix irq_domain resource tracking for
gpiochip_irqchip_add_domain()
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@...nel.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
Powered by blists - more mailing lists