Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2410078imw; Wed, 6 Jul 2022 05:35:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1umZtR3knK8S+0LlU2LTXGEgrmbiyCDicP5rR3W3f1ChjHXhkl0jS28Xrx6JNhhKDqCwyoO X-Received: by 2002:a17:90b:4a0b:b0:1ed:4a56:d805 with SMTP id kk11-20020a17090b4a0b00b001ed4a56d805mr51129767pjb.246.1657110905687; Wed, 06 Jul 2022 05:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657110905; cv=none; d=google.com; s=arc-20160816; b=d2tnXw2UlHNho6HpOupZBh2Qonp3tPq9Op8rxVPruXxTn1JKAmJKYc3ErChTiqgg/m aYzCeoZU8PrBOP2pr4Q5sn/zM5C8Tf/ss1ewbWoNwtTz3Y4JmNtUPC7BgwHgXKYtNs+8 kSDIAw4nD4M9HKjK2Y0q4C7x2A35yNiOlkXyXyusxX3FnkGD8YFbbb8qp95TVKijI9Ax DcdwwK9LyzbIgAPsGn1+jNiznKefZfY6VUmIqSywgWhRHEQ2Uw8HIf7s+5Yb8YqmsooF 5zR38slLLyLzlGozlu6mrb1P30Ni3Ihuy27wjUkhG5zftHhtn/pFAveuEn3Rg8j55Ren w6aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lcQ5M5Km2OfgeROxMy5ZnJEqoGOIn28HhlbwZQ5PQj0=; b=NAs9w+ixhUaZn8SgNd1oft7MllGPwv5EsPaVl7KF7ydOsRVolvFYf5+qQ2+5GPTFvW KcGJX9qXQ0mlYZ1Ven+hS7TamBk/HSfmCBBGkuzCLmvjLT4yGaafsCq7iCD2TLfwxpkv ZmFl7nVJtIj+B5w+uC9SBuCGU3nQZzn0WZpuDaLrGloRYPPpQmOjMyg/MLgMsU+WR5/w 1CK7y4q6h3rHwKLCNTbqsRrv6pwLRiHHmJIVnpHlcfPVdbj/PNnnfuEB0GUAQVTQM/NY jzQT0DgWIIogUwC45doyNxr10eEjXGrdYm5F1V1BjJHdoGSfrzNZXI6XlqzIUrxjsEZK oMIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=p5GrKPrZ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o20-20020a056a0015d400b005253974cdd0si56932503pfu.222.2022.07.06.05.34.53; Wed, 06 Jul 2022 05:35:05 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=p5GrKPrZ; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232405AbiGFLtF (ORCPT + 99 others); Wed, 6 Jul 2022 07:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbiGFLtD (ORCPT ); Wed, 6 Jul 2022 07:49:03 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55705275E9; Wed, 6 Jul 2022 04:49:03 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id e69so20293009ybh.2; Wed, 06 Jul 2022 04:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lcQ5M5Km2OfgeROxMy5ZnJEqoGOIn28HhlbwZQ5PQj0=; b=p5GrKPrZDN1nvjy8BBxMksQAfYYyMnagD1K966fE07GLbwDbSf9yx3eE7NejrHgbDX feTiDyDd83lvsS1HAokmoZ/4I1PP0KBSwQZnT/ppaBfYhvpA6nYNy7+48INz9Pjw1SB9 nFufm56r1gM9LTt799PE02xNyclTnFtBLbT/6yTUbxwpMYMbAOLtP2rA//dsO4cavbfx 5r5LQZeePiKpZ6CUQy43o/NEjETZCsleyX4YwLCgcK+5setVbs80NntF/6l+ZKG/4tNI DhILF82XxaEYWlydXJcBpMHxkEX1dVvkIzQLDybgPS0hdsWuUFzclI+7N8rHeRYNueJe i/FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lcQ5M5Km2OfgeROxMy5ZnJEqoGOIn28HhlbwZQ5PQj0=; b=W+qPrrfaGxP9/UpM21jyiJIJ7PYlNnafC81MQhc3aoEG1bKsPK/J6iSfdUWSdxWWVN 5Dx2yYLuoRbs5qI3/aUhLm935ywkSpkMyr1K25ltFeLdpDxHIVsatg/O7NDt5Mpf9Vro Z+Js/HLFaplRXzrM/315ygfKStQXyKA+WKXylqvCNqqjKewTjWamsI97PWmMrHRSR7ru IKdnotaN/jWjrxzP8APT57SzCe7bsPtNgxKX6R3uj1NWhA0QB7up/s8HEdFIBbxRTI0I WaNcJfIA/sC+xoZIYnW+8HeDzyJCryehzz1qzIgc1CZfB8TXS0YXZwwESoykIrXzAqPX PcPA== X-Gm-Message-State: AJIora93/O2kcJ8zk56SIjE5YONh8lPR/2+NQy1fLsjru+I6VbswcUCC 4reyn4O3LtW0rmYpheRI1jDPmxzMuTueIqKKsDsqqOCAiRg= X-Received: by 2002:a25:dd83:0:b0:66c:8d8d:4f5f with SMTP id u125-20020a25dd83000000b0066c8d8d4f5fmr42580242ybg.79.1657108142530; Wed, 06 Jul 2022 04:49:02 -0700 (PDT) MIME-Version: 1.0 References: <20220705171835.4923-1-brgl@bgdev.pl> In-Reply-To: <20220705171835.4923-1-brgl@bgdev.pl> From: Andy Shevchenko Date: Wed, 6 Jul 2022 13:48:26 +0200 Message-ID: Subject: Re: [PATCH] gpio: pxa: schedule a devm action for the clock struct To: Bartosz Golaszewski , Stephen Boyd Cc: Robert Jarzmik , Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , Hulk Robot , "Signed-off-by : Yuan Can" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Tue, Jul 5, 2022 at 7:29 PM Bartosz Golaszewski wrote: > > The clock is never released after probe(). Schedule devm actions for > putting and disabling the clock. ... > Reported-by: Signed-off-by: Yuan Can Me puzzled. ... > + ret = devm_add_action_or_reset(&pdev->dev, pxa_gpio_clk_put, clk); > + if (ret) > + return ret; > + > ret = clk_prepare_enable(clk); > + if (ret) > + return ret; > + > + ret = devm_add_action_or_reset(&pdev->dev, > + pxa_gpio_clk_disable_unprepare, clk); > + if (ret) > return ret; Can we use recently introduced clk APIs for that? Maybe Stephen has an immutable branch you may reuse? -- With Best Regards, Andy Shevchenko