Linux-Clk Archive on lore.kernel.org
 help / color / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
	Olof Johansson <olof@lixom.net>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH v3] clk: declare clk_core_reparent_orphans() inline
Date: Tue, 17 Dec 2019 00:25:00 -0800
Message-ID: <20191217082501.424892072D@mail.kernel.org> (raw)
In-Reply-To: <20191217044635.127912-1-olof@lixom.net>

Quoting Olof Johansson (2019-12-16 20:46:35)
> A recent addition exposed a helper that is only used for
> CONFIG_OF. Instead of figuring out best place to have it in the order
> of various functions, just declare it as explicitly inline, and the
> compiler will happily handle it without warning.
> 
> (Also fixup of a single stray empty line while I was looking at the code)
> 
> Fixes: 66d9506440bb ("clk: walk orphan list on clock provider registration")
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
> 
> v3: ACTUALLY amend this time. Sigh. Time to go home.
> 

Isn't it simple enough to just move the function down to CONFIG_OF in
drivers/clk/clk.c?

----8<----
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ae2795b30e06..6a11239ccde3 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3277,13 +3277,6 @@ static void clk_core_reparent_orphans_nolock(void)
 	}
 }
 
-static void clk_core_reparent_orphans(void)
-{
-	clk_prepare_lock();
-	clk_core_reparent_orphans_nolock();
-	clk_prepare_unlock();
-}
-
 /**
  * __clk_core_init - initialize the data structures in a struct clk_core
  * @core:	clk_core being initialized
@@ -4193,6 +4186,13 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb)
 EXPORT_SYMBOL_GPL(clk_notifier_unregister);
 
 #ifdef CONFIG_OF
+static void clk_core_reparent_orphans(void)
+{
+	clk_prepare_lock();
+	clk_core_reparent_orphans_nolock();
+	clk_prepare_unlock();
+}
+
 /**
  * struct of_clk_provider - Clock provider registration structure
  * @link: Entry in global list of clock providers

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17  4:41 [PATCH] " Olof Johansson
2019-12-17  4:45 ` [PATCH v2] " Olof Johansson
2019-12-17  4:46 ` [PATCH v3] " Olof Johansson
2019-12-17  8:25   ` Stephen Boyd [this message]
2019-12-17 18:01     ` Olof Johansson
2019-12-17 19:46       ` Stephen Boyd

Reply instructions:

You may reply publically 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=20191217082501.424892072D@mail.kernel.org \
    --to=sboyd@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=olof@lixom.net \
    /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

Linux-Clk Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \
		linux-clk@vger.kernel.org
	public-inbox-index linux-clk

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git