Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2374481imm; Thu, 18 Oct 2018 13:35:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV621E3QEVQq1Q60DHv4Lx6t6A1lWJvfEubV6WOTeywQQmCi7/MzQI27ZY+gEjNtnMXUNTr6X X-Received: by 2002:a62:18a:: with SMTP id 132-v6mr32049200pfb.207.1539894912845; Thu, 18 Oct 2018 13:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539894912; cv=none; d=google.com; s=arc-20160816; b=1BUVdboF3B2ZToRM19xb9SuwO7Ac6Kv0ACXkWGv8EFpCgsnUchErH/LJMsUeTT5l0P udEtF05sx9kjrw/LWHyfFBX/ENdJk744pCk4+KoXJw9cCL9GotqDPirkKa/ibvEGOkHQ V3K4egJ+QsSEpu2Sw4LZ48C6mRDD3iXpGc5V1ugeT0y5tl/AAxIoDjHVwsyltYHUXdfE kSt/UsYUQYTyWN/5u/g1MiNAJt7WoxCk2ha29SrG/5SceLLO5wGiEA+Z2Pww7muQqI5n 3pTsUQQLdt7rBhyMCRdg9pJW3fEEMtgZGfTetbLUU1jUqL5XxEg5DuKdy/I/CHKUVZ5d VzZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ML8tpOlqvV6PYzamoq1dj4Dx2UGc8xVlJktpiIo4Pcc=; b=qhDDzGwKLSeRnCH5n0jaHI7HgEKYDkJ8s7nJIa1bgyggmwDLw4x2zSUM3uR/tFtT75 FNytjYUATI+/rclk7rEQoxyml1z8R8GMkxRAtZB5lpKyhCzfPVRo94UYnrLAIDIz/Ie3 QPy6brOSikPgz99VV4UmxlSqGKwasaJlH0GBXfG1hdPotgvgJIa5m/3vMztBDE2CRHjG XCKm2NjgXEaUHA5EOJOrDSJNIZ92krmGd+I2uS9bIovS03NtQy6L/NJ4tK8JO3uhgutn rgYWq6sp6Zuh4tJ6bLuNbygO1FUTuRAi/HWtZHnX4RQHrBbsb6bmnaf5Lj97d52PxSVp Bg0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZeOPrlBF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si22712725pfb.122.2018.10.18.13.34.57; Thu, 18 Oct 2018 13:35:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZeOPrlBF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727043AbeJSEgz (ORCPT + 99 others); Fri, 19 Oct 2018 00:36:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:40396 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725738AbeJSEgy (ORCPT ); Fri, 19 Oct 2018 00:36:54 -0400 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1AB1021480; Thu, 18 Oct 2018 20:34:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539894851; bh=xibyru/6E+pbWcbcO1mQcay7znSyaxQ3AvZX6Uo7gF8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZeOPrlBFocuLQWMoYmnhJeDyTbb6BbyuxBa/tCizpxwKo49IYr1qwzQ0t1/vYJDpe uJCcJ402zOeRNNz1LaWRQyOus7OwtZKDYwptroV9ZuLaYx+pNpEHIHVYRgAKDv525Q nAG4xXtt3+qA+mGnW/gxlZQCiLQ3UM2SVlhdnA/0= Received: by mail-ed1-f42.google.com with SMTP id y19-v6so29479177edd.2; Thu, 18 Oct 2018 13:34:11 -0700 (PDT) X-Gm-Message-State: ABuFfoh1R0U+L2pkVwwSsGGqT1Yp+3DHneU7x9A5fUtXb0/VHUYm2kIe qxS/pMen9j9T1gVVUdhfZXR6FidbCzq4fD4gT0Y= X-Received: by 2002:a50:8bd5:: with SMTP id n21-v6mr4442093edn.41.1539894849583; Thu, 18 Oct 2018 13:34:09 -0700 (PDT) MIME-Version: 1.0 References: <1467735814-23518-1-git-send-email-ricardo.ribalda@gmail.com> <1467735814-23518-11-git-send-email-ricardo.ribalda@gmail.com> <153989424794.53599.4926915592056818669@swboyd.mtv.corp.google.com> In-Reply-To: <153989424794.53599.4926915592056818669@swboyd.mtv.corp.google.com> From: Alan Tull Date: Thu, 18 Oct 2018 15:33:33 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 8/8] clk: fixed-rate: Convert into a module platform driver To: sboyd@kernel.org Cc: Ricardo Ribalda Delgado , mturquette@baylibre.com, sboyd@codeaurora.org, Sascha Hauer , linux-clk@vger.kernel.org, linux-kernel , Frank Rowand Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 18, 2018 at 3:24 PM Stephen Boyd wrote: > > Quoting Alan Tull (2018-10-18 12:20:58) > > On Tue, Jul 5, 2016 at 11:45 AM Ricardo Ribalda Delgado > > wrote: > > > > I've stumbled across a of_node_get/put imbalance that happens when the > > fixed rate clock is added and deleted using device tree. The cause is > > that this driver calls of_clk_add_provider() when probed, but doesn't > > call of_clk_del_provider() when removed. > > > > It looks like a lot of clock drivers share that issue: > > > > $ cd drivers/clk/ > > $ git grep -l of_clk_add_provider * | xargs grep -L of_clk_del_provider | wc -l > > 131 > > > > It should be a one line fix, but for many files. > > > > I'm not a clock subsystem expert, so please let me know whether I'm > > missing something here. > > > > Patches welcome. Please include Fixes: tags for backports. Probably > drivers don't care because clk devices are almost never removed. That > isn't to say it shouldn't be fixed, but just giving some background on > why nobody has fixed it. Thanks for the context. I ran into this while testing some devicetree overlay code changes. My use is FPGAs where a clock may be added or removed if the FPGA is reprogrammed. Alan