All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: 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>
Subject: Re: [PATCH] gpio: pxa: use devres for the clock struct
Date: Fri, 26 Aug 2022 10:20:44 +0200	[thread overview]
Message-ID: <CACRpkdZEcTD1A3tR=d4fDF89ECMDfchVPW921v6X6ARiPXHEMQ@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vc3dazcM1MLzjzPUmgMGNACUsOZ8aK4uauAJk0hzj9q-w@mail.gmail.com>

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

  reply	other threads:[~2022-08-26  8:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15  9:19 [PATCH] gpio: pxa: use devres for the clock struct Bartosz Golaszewski
2022-08-16 21:08 ` Linus Walleij
2022-08-19 22:14 ` Andy Shevchenko
2022-08-26  8:20   ` Linus Walleij [this message]
2022-08-26 12:18     ` Christophe JAILLET
2022-08-27 12:35       ` Marion & Christophe JAILLET

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='CACRpkdZEcTD1A3tR=d4fDF89ECMDfchVPW921v6X6ARiPXHEMQ@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=hulkci@huawei.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.