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-next>] [day] [month] [year] [list]
Message-ID: <20190702100103.12c132da@canb.auug.org.au>
Date:   Tue, 2 Jul 2019 10:01:03 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Mike Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>
Cc:     Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: linux-next: build failure after merge of the clk tree

Hi all,

After merging the clk tree, today's linux-next build (arm omap1_defconfig
and many others) failed like this:

In file included from drivers/clk/clkdev.c:22:0:
drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non-static declaration
include/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw' was here

Caused by commit

  59fcdce425b7 ("clk: Remove ifdef for COMMON_CLK in clk-provider.h")

This commit exposed the CONFIG_COMMON_CLK version of the __clk_get_hw()
declaration to non CONFIG_COMMON_CLK code (where there is a static
declaration of  __clk_get_hw() (which is BTW missing an "inline")
in drivers/clk/clk.h.

We need something like this (untested):

From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Tue, 2 Jul 2019 09:58:18 +1000
Subject: [PATCH] clk: for up for "clk: Remove ifdef for COMMON_CLK in
 clk-provider.h"

We were getting errors like:

In file included from drivers/clk/clkdev.c:22:0:
drivers/clk/clk.h:36:23: error: static declaration of '__clk_get_hw' follows non
-static declaration
include/linux/clk-provider.h:808:16: note: previous declaration of '__clk_get_hw
' was here

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 drivers/clk/clk.h            | 2 +-
 include/linux/clk-provider.h | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
index d8400d623b34..143acac2ec81 100644
--- a/drivers/clk/clk.h
+++ b/drivers/clk/clk.h
@@ -33,7 +33,7 @@ clk_hw_create_clk(struct device *dev, struct clk_hw *hw, const char *dev_id,
 {
 	return (struct clk *)hw;
 }
-static struct clk_hw *__clk_get_hw(struct clk *clk)
+static inline struct clk_hw *__clk_get_hw(struct clk *clk)
 {
 	return (struct clk_hw *)clk;
 }
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 0fbf3ccad849..35c8b1c315b4 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -805,7 +805,10 @@ void devm_clk_hw_unregister(struct device *dev, struct clk_hw *hw);
 /* helper functions */
 const char *__clk_get_name(const struct clk *clk);
 const char *clk_hw_get_name(const struct clk_hw *hw);
+#ifdef CONFIG_COMON_CLK
+/* There is a !CONFIG_COMMON_CLK static inline for this in drivers/clk/clk.h */
 struct clk_hw *__clk_get_hw(struct clk *clk);
+#endif
 unsigned int clk_hw_get_num_parents(const struct clk_hw *hw);
 struct clk_hw *clk_hw_get_parent(const struct clk_hw *hw);
 struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw,
-- 
2.20.1

-- 
Cheers,
Stephen Rothwell

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ