linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] dmaengine: shdma: fix a build failure on platforms with no DMA support
Date: Thu, 30 May 2013 16:23:13 +0000	[thread overview]
Message-ID: <51A77CF1.7040105@ti.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1305301650290.29171@axis700.grange>

On 05/30/2013 11:02 AM, Guennadi Liakhovetski wrote:
> On platforms with no support for the shdma dmaengine driver build is
> currently failing with
>
> drivers/built-in.o: In function `sh_mobile_sdhi_probe':
> drivers/mmc/host/sh_mobile_sdhi.c:170: undefined reference to`shdma_chan_filter'
>
> Fix the breakage by defining shdma_chan_filter to NULL in such
> configurations.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> ---
>
> This is for "next." Compile-tested only. I'll test it on hardware next 
> week, but I don't think it shall break anything.
>
>  include/linux/sh_dma.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h
> index b64d6be..1fd8a20 100644
> --- a/include/linux/sh_dma.h
> +++ b/include/linux/sh_dma.h
> @@ -99,6 +99,10 @@ struct sh_dmae_pdata {
>  #define CHCR_TE	0x00000002
>  #define CHCR_IE	0x00000004
>  
> +#if IS_ENABLED(CONFIG_SH_DMAE)
>  bool shdma_chan_filter(struct dma_chan *chan, void *arg);
> +#else
> +#define shdma_chan_filter NULL
Would this not be better as a
#else
static inline bool shdma_chan_filter(struct dma_chan *chan, void *arg)
{
    return false;
}
#endif

Otherwise runtime will call a NULL pointer

> +#endif
>  
>  #endif


-- 
------------------
Dan Murphy


  reply	other threads:[~2013-05-30 16:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 16:02 [PATCH] dmaengine: shdma: fix a build failure on platforms with no DMA support Guennadi Liakhovetski
2013-05-30 16:23 ` Dan Murphy [this message]
2013-05-31  2:44   ` Simon Horman
2013-06-19 19:00     ` Kevin Hilman
2013-06-19 19:32       ` Guennadi Liakhovetski
2013-07-05  5:05         ` Vinod Koul
2013-07-08  7:52           ` Olof Johansson
2013-07-08  7:33             ` Vinod Koul
2013-07-10  2:09               ` Simon Horman
2013-07-08  8:13           ` Guennadi Liakhovetski
2013-07-10  2:09 ` Simon Horman
2013-07-16  1:20   ` Simon Horman
2013-07-23  2:39     ` Olof Johansson
2013-07-23  4:12       ` Simon Horman
     [not found]         ` <87zjtddgtg.wl%kuninori.morimoto.gx@renesas.com>
     [not found]           ` <20130724034009.GA18355@verge.net.au>
     [not found]             ` <87d2q8v6fs.wl%kuninori.morimoto.gx@renesas.com>
2013-07-24  6:12               ` [PATCH resend] shdma: fixup sh_dmae_get_partial() calculation error Kuninori Morimoto
2013-07-24  8:43                 ` Guennadi Liakhovetski
2013-07-26  2:38                   ` Simon Horman
2013-07-30  8:49                 ` Simon Horman
2013-07-30  9:22                   ` Guennadi Liakhovetski
2013-07-31  0:52                     ` Simon Horman

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=51A77CF1.7040105@ti.com \
    --to=dmurphy@ti.com \
    --cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).