From: Marion & Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
Robert Jarzmik <robert.jarzmik@free.fr>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Hulk Robot <hulkci@huawei.com>, Yuan Can <yuancan@huawei.com>,
Kernel Janitors <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] gpio: pxa: use devres for the clock struct
Date: Sat, 27 Aug 2022 14:35:39 +0200 [thread overview]
Message-ID: <06339802-8c3e-2a40-e4fd-6a8a774676fe@wanadoo.fr> (raw)
In-Reply-To: <e9991ab5-cb55-789a-dfa1-de10acb37842@wanadoo.fr>
Le 26/08/2022 à 14:18, Christophe JAILLET a écrit :
> Le 26/08/2022 à 10:20, Linus Walleij a écrit :
>> On Sat, Aug 20, 2022 at 12:15 AM Andy Shevchenko
>> <andy.shevchenko@gmail.com> wrote:
>>> On Mon, Aug 15, 2022 at 12:26 PM Bartosz Golaszewski <brgl@bgdev.pl>
>>> wrote:
>>>>
>>>> The clock is never released after probe(). Use devres to not leak
>>>> resources.
>>>
>>> ...
>>>
>>>> - clk = clk_get(&pdev->dev, NULL);
>>>> + clk = devm_clk_get_enabled(&pdev->dev, NULL);
>>>> if (IS_ERR(clk)) {
>>>> dev_err(&pdev->dev, "Error %ld to get gpio clock\n",
>>>> PTR_ERR(clk));
>>>> return PTR_ERR(clk);
>>>
>>> Shouldn't we fix a potential log saturation issue first (by switching
>>> to use dev_err_probe() helper)?
>>
>> Can be a separate patch, the clock mem leak is a bigger problem
>> IMO so this should be applied first.
>>
>> Hm isn't it possible to toss the task of fixing a gazillion
>> dev_err_probe() messages on Cocinelle scripts/coccinelle/? I bet it's
>> something
>> the kernel janitors could fix all over the place.
>>
>> Yours,
>> Linus Walleij
>>
>
> // Both rules: 316 files changed, 1321 insertions(+), 1774 deletions(-)
>
With an updated script, I spot:
503 files changed, 1962 insertions(+), 2622 deletions(-)
(and 150-200 still needs some manual check or script adjustment)
Does this really make sense to send SO many patches for it?
If yes, should it be done on a per-system basis, or by driver basis?
CJ
prev parent reply other threads:[~2022-08-27 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 9:19 Bartosz Golaszewski
2022-08-16 21:08 ` Linus Walleij
2022-08-19 22:14 ` Andy Shevchenko
2022-08-26 8:20 ` Linus Walleij
2022-08-26 12:18 ` Christophe JAILLET
2022-08-27 12:35 ` Marion & Christophe JAILLET [this message]
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=06339802-8c3e-2a40-e4fd-6a8a774676fe@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@bgdev.pl \
--cc=hulkci@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
--cc=yuancan@huawei.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 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®