clk: Use static inline functions instead of macros for dummies
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 29 Oct 2015 21:12:56 +0000 (22:12 +0100)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 20 Nov 2015 19:16:31 +0000 (11:16 -0800)
if CONFIG_OF=n:

    drivers/clk/clk-cs2000-cp.c: In function ‘cs2000_remove’:
    drivers/clk/clk-cs2000-cp.c:453:22: warning: unused variable ‘np’ [-Wunused-variable]
      struct device_node *np = dev->of_node;
  ^

Convert dummies of_clk_del_provider() and of_clk_init() from macros to
static inline functions to kill such compiler warnings.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
include/linux/clk-provider.h

index 7e931e7..1796f7d 100644 (file)
@@ -715,8 +715,7 @@ static inline int of_clk_add_provider(struct device_node *np,
 {
        return 0;
 }
-#define of_clk_del_provider(np) \
-       { while (0); }
+static inline void of_clk_del_provider(struct device_node *np) {}
 static inline struct clk *of_clk_src_simple_get(
        struct of_phandle_args *clkspec, void *data)
 {
@@ -741,8 +740,7 @@ static inline const char *of_clk_get_parent_name(struct device_node *np,
 {
        return NULL;
 }
-#define of_clk_init(matches) \
-       { while (0); }
+static inline void of_clk_init(const struct of_device_id *matches) {}
 #endif /* CONFIG_OF */
 
 /*