From: Guenter Roeck <linux@roeck-us.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n
Date: Tue, 28 Feb 2017 13:40:36 -0800 [thread overview]
Message-ID: <20170228214036.GD6651@roeck-us.net> (raw)
In-Reply-To: <20170228210123.3404816-2-arnd@arndb.de>
On Tue, Feb 28, 2017 at 10:01:16PM +0100, Arnd Bergmann wrote:
> The retu watchdog calls into the respective mfd driver, but fails to
> link if that is diabled:
>
> drivers/watchdog/built-in.o: In function `retu_wdt_set_timeout':
> ziirave_wdt.c:(.text+0x8c88): undefined reference to `retu_write'
> ziirave_wdt.c:(.text+0x8c88): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'
> drivers/watchdog/built-in.o: In function `retu_wdt_start':
> ziirave_wdt.c:(.text+0x8cc8): undefined reference to `retu_write'
> ziirave_wdt.c:(.text+0x8cc8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'
>
> This adds inline stub helpers that let us build the driver anyway.
>
> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/watchdog/Kconfig | 2 +-
> include/linux/mfd/retu.h | 5 +++++
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index c831b7967bf9..6ca2f3ae7f1e 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -585,7 +585,7 @@ config UX500_WATCHDOG
>
> config RETU_WATCHDOG
> tristate "Retu watchdog"
> - depends on MFD_RETU || COMPILE_TEST
> + depends on MFD_RETU || (COMPILE_TEST && MFD_RETU=n)
Let's just disable COMPILE_TEST for RETU_WATCHDOG instead.
> select WATCHDOG_CORE
> help
> Retu watchdog driver for Nokia Internet Tablets (770, N800,
> diff --git a/include/linux/mfd/retu.h b/include/linux/mfd/retu.h
> index 65471c4a3926..a6828e899775 100644
> --- a/include/linux/mfd/retu.h
> +++ b/include/linux/mfd/retu.h
> @@ -11,8 +11,13 @@
>
> struct retu_dev;
>
> +#if IS_ENABLED(CONFIG_MFD_RETU)
> int retu_read(struct retu_dev *, u8);
> int retu_write(struct retu_dev *, u8, u16);
> +#else
> +static inline int retu_read(struct retu_dev *dev, u8 r) { return -EINVAL; }
> +static inline int retu_write(struct retu_dev *dev, u8 r, u16 v) { return -EINVAL; }
> +#endif
>
> /* Registers */
> #define RETU_REG_WATCHDOG 0x17 /* Watchdog */
> --
> 2.9.0
>
next prev parent reply other threads:[~2017-02-28 21:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 21:01 [PATCH 0/8] watchdog fixes for COMPILE_TEST change Arnd Bergmann
2017-02-28 21:01 ` [PATCH 1/8] mfd: retu: add inline alternatives for CONFIG_RETU=n Arnd Bergmann
2017-02-28 21:40 ` Guenter Roeck [this message]
2017-02-28 21:01 ` [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface Arnd Bergmann
2017-02-28 21:42 ` Guenter Roeck
2017-02-28 21:47 ` Arnd Bergmann
2017-02-28 23:19 ` Guenter Roeck
2017-02-28 23:24 ` Guenter Roeck
2017-03-01 9:17 ` Arnd Bergmann
2017-03-14 11:14 ` Lee Jones
2017-03-14 11:14 ` Lee Jones
2017-03-14 12:09 ` Arnd Bergmann
2017-03-15 10:27 ` Lee Jones
2017-03-15 10:27 ` Lee Jones
2017-03-15 11:36 ` Arnd Bergmann
2017-02-28 21:01 ` [PATCH 3/8] watchdog: wm831x watchdog really needs mfd Arnd Bergmann
2017-02-28 21:36 ` Guenter Roeck
2017-02-28 21:44 ` Arnd Bergmann
2017-02-28 21:48 ` Arnd Bergmann
2017-02-28 23:16 ` Guenter Roeck
2017-03-01 2:50 ` Randy Dunlap
2017-02-28 21:01 ` [PATCH 4/8] watchdog: geode: restore hard CS5535_MFGPT dependency Arnd Bergmann
2017-02-28 21:42 ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 5/8] watchdog: menf21bmc: add I2C dependency Arnd Bergmann
2017-02-28 21:43 ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 6/8] watchdog: sp805: add back AMBA dependency Arnd Bergmann
2017-02-28 21:43 ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 7/8] watchdog: bcm2835: add CONFIG_OF dependency Arnd Bergmann
2017-02-28 21:43 ` Guenter Roeck
2017-02-28 21:01 ` [PATCH 8/8] watchdog: kempld: revert to full dependency Arnd Bergmann
2017-02-28 21:39 ` Guenter Roeck
2017-02-28 21:31 ` [PATCH 0/8] watchdog fixes for COMPILE_TEST change Guenter Roeck
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=20170228214036.GD6651@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arnd@arndb.de \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.