LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Fabrice Gasnier <fabrice.gasnier@st.com>,
	lee.jones@linaro.org, thierry.reding@gmail.com
Cc: sfr@canb.auug.org.au, gerald.baeza@st.com,
	alexandre.torgue@st.com, mcoquelin.stm32@gmail.com,
	linux-next@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org
Subject: Re: [PATCH 1/2] mfd: stm32-timers: fix pwm-stm32 linker issue with COMPILE_TEST
Date: Fri, 18 May 2018 09:56:24 -0700	[thread overview]
Message-ID: <0f03fe4b-0b5f-92f1-2929-c6c585432159@infradead.org> (raw)
In-Reply-To: <1526657044-14879-2-git-send-email-fabrice.gasnier@st.com>

On 05/18/2018 08:24 AM, Fabrice Gasnier wrote:
> This is seen when COMPILE_TEST=y and MFD_STM32_TIMERS=n.
> drivers/pwm/pwm-stm32.o: In function 'stm32_pwm_raw_capture':
> pwm-stm32.c:... undefined reference to 'stm32_timers_dma_burst_read'
> Fixes: 0c6609805b63 ("mfd: stm32-timers: Add support for DMAs")
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  include/linux/mfd/stm32-timers.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h
> index 9da1d7e..067d146 100644
> --- a/include/linux/mfd/stm32-timers.h
> +++ b/include/linux/mfd/stm32-timers.h
> @@ -124,8 +124,20 @@ struct stm32_timers {
>  	struct stm32_timers_dma dma; /* Only to be used by the parent */
>  };
>  
> +#if IS_REACHABLE(CONFIG_MFD_STM32_TIMERS)
>  int stm32_timers_dma_burst_read(struct device *dev, u32 *buf,
>  				enum stm32_timers_dmas id, u32 reg,
>  				unsigned int num_reg, unsigned int bursts,
>  				unsigned long tmo_ms);
> +#else
> +static inline int stm32_timers_dma_burst_read(struct device *dev, u32 *buf,
> +					      enum stm32_timers_dmas id,
> +					      u32 reg,
> +					      unsigned int num_reg,
> +					      unsigned int bursts,
> +					      unsigned long tmo_ms)
> +{
> +	return -ENODEV;
> +}
> +#endif
>  #endif
> 


-- 
~Randy

  reply	other threads:[~2018-05-18 16:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 15:24 [PATCH 0/2] Fix STM32 PWM capture build " Fabrice Gasnier
2018-05-18 15:24 ` [PATCH 1/2] mfd: stm32-timers: fix pwm-stm32 linker issue " Fabrice Gasnier
2018-05-18 16:56   ` Randy Dunlap [this message]
2018-06-04  6:13   ` Lee Jones
2018-05-18 15:24 ` [PATCH 2/2] pwm: stm32: initialize raw local variables Fabrice Gasnier
2018-05-18 16:56   ` Randy Dunlap
2018-05-18 22:05   ` Thierry Reding
2018-06-04  6:12   ` Lee Jones

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=0f03fe4b-0b5f-92f1-2929-c6c585432159@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=alexandre.torgue@st.com \
    --cc=fabrice.gasnier@st.com \
    --cc=gerald.baeza@st.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=sfr@canb.auug.org.au \
    --cc=thierry.reding@gmail.com \
    --subject='Re: [PATCH 1/2] mfd: stm32-timers: fix pwm-stm32 linker issue with COMPILE_TEST' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).