linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: provide clk_is_match() dummy for non-common clk
Date: Sun, 08 Mar 2015 22:05:29 +0100	[thread overview]
Message-ID: <8682755.oK0Ae34OOP@wuerfel> (raw)
In-Reply-To: <20150225172757.421.43718@quantum>

ARM randconfig build tests found a new error for configurations
with COMMON_CLK disabled but HAS_CLK selected by the platform:

ERROR: "clk_is_match" [sound/soc/fsl/snd-soc-fsl-spdif.ko] undefined!

This moves the declaration around, so this case is covered
by the existing static inline helper function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: c69e182e51d89 ("clk: introduce clk_is_match")
----
BTW, we have a preexisting problem in clk_get_parent,
clk_round_rate and clk_set_parent, which I've worked around in
my randconfig builds so far. Should we do that the same way?

diff --git a/include/linux/clk.h b/include/linux/clk.h
index 5c076e4d90f9..a9b91595d106 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -125,6 +125,19 @@ int clk_set_phase(struct clk *clk, int degrees);
  */
 int clk_get_phase(struct clk *clk);
 
+/**
+ * clk_is_match - check if two clk's point to the same hardware clock
+ * @p: clk compared against q
+ * @q: clk compared against p
+ *
+ * Returns true if the two struct clk pointers both point to the same hardware
+ * clock node. Put differently, returns true if struct clk *p and struct clk *q
+ * share the same struct clk_core object.
+ *
+ * Returns false otherwise. Note that two NULL clks are treated as matching.
+ */
+bool clk_is_match(struct clk *p, struct clk *q);
+
 #else
 
 static inline long clk_get_accuracy(struct clk *clk)
@@ -142,6 +155,11 @@ static inline long clk_get_phase(struct clk *clk)
 	return -ENOTSUPP;
 }
 
+static inline bool clk_is_match(struct clk *p, struct clk *q)
+{
+	return p == q ? true : false;
+}
+
 #endif
 
 /**
@@ -376,19 +394,6 @@ struct clk *clk_get_parent(struct clk *clk);
  */
 struct clk *clk_get_sys(const char *dev_id, const char *con_id);
 
-/**
- * clk_is_match - check if two clk's point to the same hardware clock
- * @p: clk compared against q
- * @q: clk compared against p
- *
- * Returns true if the two struct clk pointers both point to the same hardware
- * clock node. Put differently, returns true if struct clk *p and struct clk *q
- * share the same struct clk_core object.
- *
- * Returns false otherwise. Note that two NULL clks are treated as matching.
- */
-bool clk_is_match(struct clk *p, struct clk *q);
-
 #else /* !CONFIG_HAVE_CLK */
 
 static inline struct clk *clk_get(struct device *dev, const char *id)
@@ -442,11 +447,6 @@ static inline struct clk *clk_get_parent(struct clk *clk)
 	return NULL;
 }
 
-static inline bool clk_is_match(struct clk *p, struct clk *q)
-{
-	return p == q ? true : false;
-}
-
 #endif
 
 /* clk_prepare_enable helps cases using clk_enable in non-atomic context. */

  parent reply	other threads:[~2015-03-08 21:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 14:53 [PATCH 0/8] Fix struct clk pointer comparing Shawn Guo
2015-02-25 14:53 ` [PATCH 1/8] clk: add helper function clk_is_match() Shawn Guo
2015-02-25 17:27   ` Mike Turquette
2015-02-26  0:37     ` Shawn Guo
2015-02-26  9:02     ` [alsa-devel] " Ben Dooks
2015-02-26  9:56       ` Philipp Zabel
2015-02-26 11:25         ` Ben Dooks
2015-02-26 11:59           ` Ricard Wanderlof
2015-03-04  8:55     ` Geert Uytterhoeven
2015-03-04  9:51     ` Russell King - ARM Linux
2015-03-08 21:05     ` Arnd Bergmann [this message]
2015-03-10 21:42       ` [PATCH] clk: provide clk_is_match() dummy for non-common clk Geert Uytterhoeven
2015-03-11  7:09       ` Uwe Kleine-König
2015-03-11 10:22       ` Russell King - ARM Linux
2015-03-11 11:17         ` Uwe Kleine-König
2015-03-11 12:29           ` Russell King - ARM Linux
2015-03-12  0:35             ` Stephen Boyd
2015-02-25 14:53 ` [PATCH 2/8] ARM: imx: fix struct clk pointer comparing Shawn Guo
2015-02-25 14:53 ` [PATCH 3/8] drm: armada: " Shawn Guo
2015-02-25 14:53 ` [PATCH 4/8] pwm: atmel-hlcdc: " Shawn Guo
2015-02-26  9:22   ` Nicolas Ferre
2015-02-26  9:31     ` Boris Brezillon
2015-03-11 10:54   ` Thierry Reding
2015-02-25 14:53 ` [PATCH 5/8] serial: samsung: " Shawn Guo
2015-02-25 14:53 ` [PATCH 6/8] ASoC: fsl_esai: " Shawn Guo
2015-02-26  2:36   ` Mark Brown
2015-02-25 14:53 ` [PATCH 7/8] ASoC: fsl_spdif: " Shawn Guo
2015-02-25 21:04   ` Stephen Boyd
2015-02-26  1:17     ` Shawn Guo
2015-02-26  2:12   ` Mark Brown
2015-02-26  2:20     ` Shawn Guo
2015-02-26  2:29       ` Mark Brown
2015-02-26  2:36   ` Mark Brown
2015-02-25 14:53 ` [PATCH 8/8] ASoC: kirkwood: " Shawn Guo
2015-02-26  2:12   ` Mark Brown
2015-02-26  2:36   ` Mark Brown
2015-02-25 15:03 ` [PATCH 0/8] Fix " Russell King - ARM Linux
2015-02-25 17:55   ` Mike Turquette
2015-02-25 20:42     ` Stephen Boyd
2015-02-26  1:21       ` Shawn Guo
2015-02-26  1:24       ` Mike Turquette

Reply instructions:

You may reply publicly 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=8682755.oK0Ae34OOP@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).