Messages in this thread | | | Date | Sat, 27 Aug 2022 14:35:39 +0200 | Subject | Re: [PATCH] gpio: pxa: use devres for the clock struct | From | Marion & Christophe JAILLET <> |
| |
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
| |