mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 08/20] clk: No-op CLK_OF_DECLARE if not enabled
Date: Thu, 9 Mar 2017 11:54:48 +0100	[thread overview]
Message-ID: <20170309105448.nqtziv6lmjqwpgj5@pengutronix.de> (raw)
In-Reply-To: <20170308220909.4560-9-andrew.smirnov@gmail.com>

Hi Andrey,

On Wed, Mar 08, 2017 at 02:08:57PM -0800, Andrey Smirnov wrote:
> Instead of wrapping each defenition of CLK_OF_DECLARE hook with
> preprocessor guards, change the definition of CLK_OF_DECLARE to expand
> into no-op if COMMON_CLK_OF_PROVIDER is not enabled.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  drivers/clk/clk-fixed-factor.c | 2 --
>  drivers/clk/clk-fixed.c        | 3 +--
>  include/linux/clk.h            | 6 +++++-
>  3 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
> index a3dbf33..0be4855 100644
> --- a/drivers/clk/clk-fixed-factor.c
> +++ b/drivers/clk/clk-fixed-factor.c
> @@ -93,7 +93,6 @@ struct clk *clk_fixed_factor(const char *name,
>  	return &f->clk;
>  }
>  
> -#if defined(CONFIG_COMMON_CLK_OF_PROVIDER)
>  /**
>   * of_fixed_factor_clk_setup() - Setup function for simple fixed factor clock
>   */
> @@ -127,4 +126,3 @@ static int of_fixed_factor_clk_setup(struct device_node *node)
>  }
>  CLK_OF_DECLARE(fixed_factor_clk, "fixed-factor-clock",
>  		of_fixed_factor_clk_setup);
> -#endif

This causes compile breakage when CONFIG_COMMON_CLK_OF_PROVIDER is disabled:

drivers/clk/clk-fixed.c: In function 'of_fixed_clk_setup':
drivers/clk/clk-fixed.c:75:2: error: implicit declaration of function 'of_clk_add_provider' [-Werror=implicit-function-declaration]
drivers/clk/clk-fixed.c:75:35: error: 'of_clk_src_simple_get' undeclared (first use in this function)
drivers/clk/clk-fixed.c:75:35: note: each undeclared identifier is reported only once for each function it appears in
drivers/clk/clk-fixed.c: At top level:
drivers/clk/clk-fixed.c:61:12: warning: 'of_fixed_clk_setup' defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
ICECC[17949] 11:47:35: Compiled on 10.1.0.23
/ptx/work/dude/WORK_A/sha/backup/barebox/barebox/scripts/Makefile.build:249: recipe for target 'drivers/clk/clk-fixed.o' failed
make[3]: *** [drivers/clk/clk-fixed.o] Error 1
make[3]: *** Waiting for unfinished jobs....
  LD      drivers/pinctrl/built-in.o
  CC      drivers/clk/imx/clk-pllv1.o
  CC      drivers/clk/imx/clk-pllv2.o
  CC      drivers/clk/imx/clk-pllv3.o
  CC      drivers/clk/imx/clk-pfd.o
  CC      drivers/clk/imx/clk-gate2.o
  CC      drivers/clk/imx/clk-gate-exclusive.o
  CC      drivers/clk/imx/clk-cpu.o
  CC      drivers/clk/imx/clk.o
  LD      drivers/watchdog/built-in.o
  CC      drivers/clk/imx/clk-imx25.o
drivers/clk/clk-fixed-factor.c: In function 'of_fixed_factor_clk_setup':
drivers/clk/clk-fixed-factor.c:119:2: error: implicit declaration of function 'of_clk_get_parent_name' [-Werror=implicit-function-declaration]
drivers/clk/clk-fixed-factor.c:119:14: warning: assignment makes pointer from integer without a cast
drivers/clk/clk-fixed-factor.c:125:2: error: implicit declaration of function 'of_clk_add_provider' [-Werror=implicit-function-declaration]
drivers/clk/clk-fixed-factor.c:125:35: error: 'of_clk_src_simple_get' undeclared (first use in this function)
drivers/clk/clk-fixed-factor.c:125:35: note: each undeclared identifier is reported only once for each function it appears in
drivers/clk/clk-fixed-factor.c: At top level:
drivers/clk/clk-fixed-factor.c:99:12: warning: 'of_fixed_factor_clk_setup' defined but not used [-Wunused-function]

I dropped this patch for now.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-03-09 10:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 22:08 [PATCH 00/20] AT91, at91sam9x5ek updates (part I/III) Andrey Smirnov
2017-03-08 22:08 ` [PATCH 01/20] at91: Fix bug/typo in debug_ll.h Andrey Smirnov
2017-03-08 22:08 ` [PATCH 02/20] regmap: Implement syscon_node_to_regmap() Andrey Smirnov
2017-03-08 22:08 ` [PATCH 03/20] pinctrl: at91: Fix a bug in at91_pinctrl_set_conf() Andrey Smirnov
2017-03-08 22:08 ` [PATCH 04/20] pinctrl: at91: Fix a bug in at91_pinctrl_set_state() Andrey Smirnov
2017-03-08 22:08 ` [PATCH 05/20] pinctrl: at91: Implement .get_direction hook Andrey Smirnov
2017-03-08 22:08 ` [PATCH 06/20] clk: Port two helper functions from Linux Andrey Smirnov
2017-03-08 22:08 ` [PATCH 07/20] clk: Make COMMON_CLK_OF_PROVIDER depend on OFTREE Andrey Smirnov
2017-03-08 22:08 ` [PATCH 08/20] clk: No-op CLK_OF_DECLARE if not enabled Andrey Smirnov
2017-03-09 10:54   ` Sascha Hauer [this message]
2017-03-08 22:08 ` [PATCH 09/20] of: base: Use scoring in DT device matching Andrey Smirnov
2017-03-08 22:08 ` [PATCH 10/20] serial: atmel: Check result of clk_get() Andrey Smirnov
2017-03-08 22:09 ` [PATCH 11/20] usb: ohci-at91: " Andrey Smirnov
2017-03-08 22:09 ` [PATCH 12/20] usb: ohci-at91: Convert global variables to private data Andrey Smirnov
2017-03-08 22:09 ` [PATCH 13/20] usb: ohci-at91: Check result of clk_enable() Andrey Smirnov
2017-03-08 22:09 ` [PATCH 14/20] usb: ehci-atmel: " Andrey Smirnov
2017-03-08 22:09 ` [PATCH 15/20] usb: echi-atmel: Convert global variables to private data Andrey Smirnov
2017-03-08 22:09 ` [PATCH 16/20] usb: ehci-atmel: Zero ehci_data before using it Andrey Smirnov
2017-03-08 22:09 ` [PATCH 17/20] usb: echi-atmel: Check result of ehci_register() Andrey Smirnov
2017-03-08 22:09 ` [PATCH 18/20] spi: atmel_spi: Configure CS GPIO as output Andrey Smirnov
2017-03-08 22:09 ` [PATCH 19/20] spi: atmel_spi: Use VERSION register instead of CPU type Andrey Smirnov
2017-03-08 22:09 ` [PATCH 20/20] clocksource: at91: Move to 'drivers/clocksource' Andrey Smirnov
2017-03-09  7:19 ` [PATCH 00/20] AT91, at91sam9x5ek updates (part I/III) Sascha Hauer

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=20170309105448.nqtziv6lmjqwpgj5@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@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