lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191217082501.424892072D@mail.kernel.org>
Date:   Tue, 17 Dec 2019 00:25:00 -0800
From:   Stephen Boyd <sboyd@...nel.org>
To:     Michael Turquette <mturquette@...libre.com>,
        Olof Johansson <olof@...om.net>
Cc:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        Olof Johansson <olof@...om.net>
Subject: Re: [PATCH v3] clk: declare clk_core_reparent_orphans() inline

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@...om.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ