mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <andy.shevchenko@gmail.com>
Cc: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linus.walleij@linaro.org>, <p.zabel@pengutronix.de>,
	<horatiu.vultur@microchip.com>
Subject: Re: [PATCH -next v2 1/2] pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe()
Date: Sat, 17 Sep 2022 19:19:53 +0800	[thread overview]
Message-ID: <3bb3ca59-a248-eacd-9452-f1e7429b0557@huawei.com> (raw)
In-Reply-To: <YyWLVF6OAyerJKvR@surfacebook>

Hi,

On 2022/9/17 16:54, andy.shevchenko@gmail.com wrote:
> Sat, Sep 17, 2022 at 10:46:33AM +0800, Yang Yingliang kirjoitti:
>> Add the missing destroy_workqueue() before return from ocelot_pinctrl_probe()
>> in error path.
>>
>> Fixes: c297561bc98a ("pinctrl: ocelot: Fix interrupt controller")
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> ---
>> v2:
>>    move alloc_ordered_workqueue() after ocelot_pinctrl_register().
> Why? What will happen if user space start using pins before workqueue is allocated?
This is a suggestion from Horatiu Vultur.

And I think the workqueue is used in ocelot_irq_unmask_level(), but 
before ocelot_gpiochip_register() calling,
the irq is not prepared, the work won't be queued before 
ocelot_gpiochip_register().
>
> If you really want to have it correct, you need either drop all devm_ calls
> after allocating workqueue, or wrap destroying into devm.
I am trying to add devm APIs for allocating workqueue.

Thanks,
Yang
>

  reply	other threads:[~2022-09-17 11:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17  2:46 Yang Yingliang
2022-09-17  2:46 ` [PATCH -next v2 2/2] pinctrl: ocelot: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
2022-09-17  8:55   ` andy.shevchenko
2022-09-17  8:54 ` [PATCH -next v2 1/2] pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe() andy.shevchenko
2022-09-17 11:19   ` Yang Yingliang [this message]
2022-10-04  7:09 ` Linus Walleij
2022-10-04  9:11   ` Horatiu Vultur

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=3bb3ca59-a248-eacd-9452-f1e7429b0557@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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

all inboxes | Powered by JetHome®