diff mbox

clk: provide clk_is_match() dummy for non-common clk

Message ID 8682755.oK0Ae34OOP@wuerfel (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann March 8, 2015, 9:05 p.m. UTC
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?

Comments

Geert Uytterhoeven March 10, 2015, 9:42 p.m. UTC | #1
On Sun, Mar 8, 2015 at 10:05 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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")

FYI, this also happens for sh/allmodconfig
http://kisskb.ellerman.id.au/kisskb/buildresult/12379884/

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Uwe Kleine-König March 11, 2015, 7:09 a.m. UTC | #2
Hello, 

On Sun, Mar 08, 2015 at 10:05:29PM +0100, Arnd Bergmann wrote:
> +static inline bool clk_is_match(struct clk *p, struct clk *q)
> +{
> +	return p == q ? true : false;
OK, this is only a move, but I wonder why Russell's comment that this is
equivalent to the easier

	return p == q;

wasn't addressed?!

Best regards
Uwe
Russell King - ARM Linux March 11, 2015, 10:22 a.m. UTC | #3
On Sun, Mar 08, 2015 at 10:05:29PM +0100, Arnd Bergmann wrote:
> 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?

NAK, as Uwe points out, you didn't address my comment.
Uwe Kleine-König March 11, 2015, 11:17 a.m. UTC | #4
Hey Russell,

On Wed, Mar 11, 2015 at 10:22:09AM +0000, Russell King - ARM Linux wrote:
> On Sun, Mar 08, 2015 at 10:05:29PM +0100, Arnd Bergmann wrote:
> > 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?
> 
> NAK, as Uwe points out, you didn't address my comment.
You commented on the patch that is c69e182e51d8 ("clk: introduce
clk_is_match") now in next. Arnd just moved this around.

Best regards
Uwe
Russell King - ARM Linux March 11, 2015, 12:29 p.m. UTC | #5
On Wed, Mar 11, 2015 at 12:17:55PM +0100, Uwe Kleine-König wrote:
> Hey Russell,
> 
> On Wed, Mar 11, 2015 at 10:22:09AM +0000, Russell King - ARM Linux wrote:
> > On Sun, Mar 08, 2015 at 10:05:29PM +0100, Arnd Bergmann wrote:
> > > 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?
> > 
> > NAK, as Uwe points out, you didn't address my comment.
> You commented on the patch that is c69e182e51d8 ("clk: introduce
> clk_is_match") now in next. Arnd just moved this around.

*Sigh*

Mike - please remove this commit until proper kernel patch process is
honoured.  We'll have some order here, and mutual respect of fellow
kernel developers, rather than people selectively ignoring people.
Yes, I realise that it fixes a bug, but it's utterly disgusting that
comments on a patch are ignored and it's just picked up irrespective
of comments being addressed.

If you don't like that, bloody well do a better job.
diff mbox

Patch

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. */