mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 2/8] mfd: db8500-prcmu: fix stub helper interface
Date: Tue, 28 Feb 2017 13:42:03 -0800	[thread overview]
Message-ID: <20170228214203.GE6651@roeck-us.net> (raw)
In-Reply-To: <20170228210123.3404816-3-arnd@arndb.de>

On Tue, Feb 28, 2017 at 10:01:17PM +0100, Arnd Bergmann wrote:
> When the db8500 watchdog is enabled without the PRCMU, we get a lot of
> warnings about duplicate or missing helper functions:
> 
> In file included from drivers/watchdog/ux500_wdt.c:21:0:
> include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
>  static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> 
> This removes the duplicate function definitions and moves the helpers in
> dbx500-prcmu outside of the #ifdef that hides them.
> 

Is that appropriate ? Maybe we should just disable COMPILE_TEST
for this driver instead.

> Fixes: da2a68b3eb47 ("watchdog: Enable COMPILE_TEST where possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/mfd/db8500-prcmu.h | 27 ----------------------
>  include/linux/mfd/dbx500-prcmu.h | 49 ++++++++++++++++++++--------------------
>  2 files changed, 25 insertions(+), 51 deletions(-)
> 
> diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
> index 7ba67b55b312..ac9b8a6b8e9c 100644
> --- a/include/linux/mfd/db8500-prcmu.h
> +++ b/include/linux/mfd/db8500-prcmu.h
> @@ -500,17 +500,12 @@ void prcmu_configure_auto_pm(struct prcmu_auto_pm_config *sleep,
>  	struct prcmu_auto_pm_config *idle);
>  bool prcmu_is_auto_pm_enabled(void);
>  
> -int prcmu_config_clkout(u8 clkout, u8 source, u8 div);
>  int prcmu_set_clock_divider(u8 clock, u8 divider);
>  int db8500_prcmu_config_hotdog(u8 threshold);
>  int db8500_prcmu_config_hotmon(u8 low, u8 high);
>  int db8500_prcmu_start_temp_sense(u16 cycles32k);
>  int db8500_prcmu_stop_temp_sense(void);
> -int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
> -int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
>  
> -int prcmu_ac_wake_req(void);
> -void prcmu_ac_sleep_req(void);
>  void db8500_prcmu_modem_reset(void);
>  
>  int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off);
> @@ -608,11 +603,6 @@ static inline bool prcmu_is_auto_pm_enabled(void)
>  	return false;
>  }
>  
> -static inline int prcmu_config_clkout(u8 clkout, u8 source, u8 div)
> -{
> -	return 0;
> -}
> -
>  static inline int prcmu_set_clock_divider(u8 clock, u8 divider)
>  {
>  	return 0;
> @@ -638,23 +628,6 @@ static inline int db8500_prcmu_stop_temp_sense(void)
>  	return 0;
>  }
>  
> -static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size)
> -{
> -	return -ENOSYS;
> -}
> -
> -static inline int prcmu_ac_wake_req(void)
> -{
> -	return 0;
> -}
> -
> -static inline void prcmu_ac_sleep_req(void) {}
> -
>  static inline void db8500_prcmu_modem_reset(void) {}
>  
>  static inline void db8500_prcmu_system_reset(u16 reset_code) {}
> diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
> index 2e2c6a63a065..533459c7ad08 100644
> --- a/include/linux/mfd/dbx500-prcmu.h
> +++ b/include/linux/mfd/dbx500-prcmu.h
> @@ -376,30 +376,6 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value)
>  	db8500_prcmu_write_masked(reg, mask, value);
>  }
>  
> -static inline int prcmu_enable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_enable_a9wdog(id);
> -}
> -
> -static inline int prcmu_disable_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_disable_a9wdog(id);
> -}
> -
> -static inline int prcmu_kick_a9wdog(u8 id)
> -{
> -	return db8500_prcmu_kick_a9wdog(id);
> -}
> -
> -static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> -{
> -	return db8500_prcmu_load_a9wdog(id, timeout);
> -}
> -
> -static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> -{
> -	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> -}
>  #else
>  
>  static inline void prcmu_early_init(u32 phy_base, u32 size) {}
> @@ -569,6 +545,31 @@ static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {}
>  
>  #endif
>  
> +static inline int prcmu_enable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_enable_a9wdog(id);
> +}
> +
> +static inline int prcmu_disable_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_disable_a9wdog(id);
> +}
> +
> +static inline int prcmu_kick_a9wdog(u8 id)
> +{
> +	return db8500_prcmu_kick_a9wdog(id);
> +}
> +
> +static inline int prcmu_load_a9wdog(u8 id, u32 timeout)
> +{
> +	return db8500_prcmu_load_a9wdog(id, timeout);
> +}
> +
> +static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
> +{
> +	return db8500_prcmu_config_a9wdog(num, sleep_auto_off);
> +}
> +
>  static inline void prcmu_set(unsigned int reg, u32 bits)
>  {
>  	prcmu_write_masked(reg, bits, bits);
> -- 
> 2.9.0
> 

  reply	other threads:[~2017-02-28 21:42 UTC|newest]

Thread overview: 30+ 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
2017-02-28 21:01 ` [PATCH 2/8] mfd: db8500-prcmu: fix stub helper interface Arnd Bergmann
2017-02-28 21:42   ` Guenter Roeck [this message]
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 12:09     ` Arnd Bergmann
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=20170228214203.GE6651@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome