Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1320697rwe; Sat, 27 Aug 2022 05:45:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR5KY4JVMXZzVns/N9AEBK206aDSmQqdGM7zQhGu+HqHqZaBXkI5x0RsWY+0H2eepipRnJaG X-Received: by 2002:a65:6e8f:0:b0:42a:c7d3:f2ed with SMTP id bm15-20020a656e8f000000b0042ac7d3f2edmr6861083pgb.209.1661604344478; Sat, 27 Aug 2022 05:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661604344; cv=none; d=google.com; s=arc-20160816; b=Kac+5zInr2MUyX2SOpNVMdLbEwf4vq2MjRDhCIMnGhGDxSFP2Dj62dbqi1oZm47hOY x057qXSBFvFXDlosj8cP7C44ofe+sSv35FbLrI9J3QKz54oD1+jITyKlzL3i5UsIhlTP Fg7ujHKQm5yReMKlNfpQHNQcw/fs6ybPs+WQpu/P/GrkSi94yQKweriOsXKts5tc6R/w ed06Ysr+deHXRfpU5uSzd9QGsq54NSBd91v8ZPzRL/qiSE5/yVDd+hfvNcSLDZ9cx5Bc 30H6d+N/wTSpWYgUFeTvnyP6Bq4aaIg2cSoxd4Hw7wawgEzgyUvTsFm5rrKFlHPWpyjq 0+rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=ENC80izCEDO/ISPnVMXPj8buDxAbMtHmZg9LP9+sDg4=; b=Ds+OO/g9LQ//UbRsxcdKAVjc+UwYADOFy85b6EOBSgE2Jq7jGzAxcucqt4pzm6sw1Y GKoQuyt9bO723FMV4TsuhCw4hQBZ6sRmDFdKpl5QDpGApTypQbzkmlzGLx02QQU5o4UV dr99sUVma+o6z7/XxUZ+Z50LocNAGMYoSmtvrdRkLyjTgmszqWf0oMbbGYi0kjl4lAkq bRP7gE0q4/UAfIF55CEqqG++gkStYINcCdhp8SDQmR4Ym2pIXIhFh5BkXVK2yiQSDnwF IiMDQk/ZHfs3LvsqV2uKR0qoRy69lESf9bVEp+bjfHlFbVOINWuUoHwdHZl4tCwuZkQQ TClg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u23-20020a63ef17000000b00425e9ffb337si4110736pgh.856.2022.08.27.05.45.32; Sat, 27 Aug 2022 05:45:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231727AbiH0Mfr (ORCPT + 99 others); Sat, 27 Aug 2022 08:35:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232627AbiH0Mfo (ORCPT ); Sat, 27 Aug 2022 08:35:44 -0400 Received: from smtp.smtpout.orange.fr (smtp-30.smtpout.orange.fr [80.12.242.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109091C908 for ; Sat, 27 Aug 2022 05:35:42 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id Rv2JoJciNXFXxRv2KoYu3k; Sat, 27 Aug 2022 14:35:41 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 27 Aug 2022 14:35:41 +0200 X-ME-IP: 90.11.190.129 Message-ID: <06339802-8c3e-2a40-e4fd-6a8a774676fe@wanadoo.fr> Date: Sat, 27 Aug 2022 14:35:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] gpio: pxa: use devres for the clock struct Content-Language: en-US From: Marion & Christophe JAILLET To: Linus Walleij , Andy Shevchenko Cc: Bartosz Golaszewski , Robert Jarzmik , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Hulk Robot , Yuan Can , Kernel Janitors References: <20220815091929.130547-1-brgl@bgdev.pl> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> wrote: >>> On Mon, Aug 15, 2022 at 12:26 PM Bartosz Golaszewski >>> 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