From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH v3] pinctrl: ocelot: Fix interrupt controller
Date: Fri, 9 Sep 2022 18:09:01 +0300 [thread overview]
Message-ID: <CAHp75VfNjQTVjsjWNJ1oOGuovxt_=ZEZrEfTvj=-Ym9R_ZzPoQ@mail.gmail.com> (raw)
In-Reply-To: <20220909145942.844102-1-horatiu.vultur@microchip.com>
On Fri, Sep 9, 2022 at 5:55 PM Horatiu Vultur
<horatiu.vultur@microchip.com> wrote:
Thanks for an update, my comments below.
...
> - dev_set_drvdata(dev, info->map);
> + dev_set_drvdata(dev, info);
I would also change it to platform_set_drvdata() to keep symmetry with
->remove().
...
> +static int ocelot_pinctrl_remove(struct platform_device *pdev)
> +{
> + struct ocelot_pinctrl *info = platform_get_drvdata(pdev);
> + destroy_workqueue(info->wq);
Is it a synchronous operation? Anyway, what does guarantee that after
this no other task can schedule a new work due to unmasking an
interrupt? I think you need to be sure your device is quiescent before
killing that workqueue. Something like synchronize_irq() +
disable_irq() or equivalent? (I don't know for sure, you need to
investigate it yourself and find the best suitable way).
> + return 0;
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-09-09 15:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 14:59 [PATCH v3] pinctrl: ocelot: Fix interrupt controller Horatiu Vultur
2022-09-09 15:09 ` Andy Shevchenko [this message]
2022-09-15 11:33 ` Horatiu Vultur
2022-09-14 13:02 ` Linus Walleij
2022-09-15 11:22 ` Horatiu Vultur
2022-09-18 18:55 ` Linus Walleij
2022-09-20 12:06 ` Michael Walle
2022-09-20 12:28 ` Linus Walleij
2022-09-20 12:34 ` Michael Walle
2022-09-20 14:25 ` Michael Walle
2022-09-20 19:30 ` Horatiu Vultur
2022-10-06 11:43 ` Michael Walle
2022-10-07 9:49 ` Horatiu Vultur
2022-10-13 7:30 ` Michael Walle
2022-10-13 14: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='CAHp75VfNjQTVjsjWNJ1oOGuovxt_=ZEZrEfTvj=-Ym9R_ZzPoQ@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=horatiu.vultur@microchip.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;
as well as URLs for NNTP newsgroup(s).