diff mbox

mmc: tmio: Fix build errors

Message ID E1QLbJV-0007eN-AF@outmx05.plus.net (mailing list archive)
State New, archived
Headers show

Commit Message

Paul Parsons May 15, 2011, 1:24 p.m. UTC
Conditional code in tmio_mmc.h selects dummy tmio_mmc_start_dma(), tmio_mmc_request_dma() and tmio_mmc_release_dma() inline functions instead of the required declarations. This breaks the build of tmio_mmc_dma.c

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
---

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Guennadi Liakhovetski May 16, 2011, 9:07 p.m. UTC | #1
On Sun, 15 May 2011, Paul Parsons wrote:

> Conditional code in tmio_mmc.h selects dummy tmio_mmc_start_dma(), 
> tmio_mmc_request_dma() and tmio_mmc_release_dma() inline functions 
> instead of the required declarations. This breaks the build of 
> tmio_mmc_dma.c
> 
> Signed-off-by: Paul Parsons <lost.distance@yahoo.com>

NAK. Are you trying to use DMA with TMIO on your platform? Then this is a 
wrong fix. Otherwise tmio_mmc_dma.c shouldn't be compiled on your arch at 
all.

Thanks
Guennadi

> ---
> diff -uprN clean-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h linux-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h
> --- clean-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h	2011-05-11 00:54:17.647289808 +0100
> +++ linux-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h	2011-05-14 16:30:47.208267896 +0100
> @@ -98,26 +98,8 @@ static inline void tmio_mmc_kunmap_atomi
>  	local_irq_restore(*flags);
>  }
>  
> -#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
>  void tmio_mmc_start_dma(struct tmio_mmc_host *host, struct mmc_data *data);
>  void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata);
>  void tmio_mmc_release_dma(struct tmio_mmc_host *host);
> -#else
> -static inline void tmio_mmc_start_dma(struct tmio_mmc_host *host,
> -			       struct mmc_data *data)
> -{
> -}
> -
> -static inline void tmio_mmc_request_dma(struct tmio_mmc_host *host,
> -				 struct tmio_mmc_data *pdata)
> -{
> -	host->chan_tx = NULL;
> -	host->chan_rx = NULL;
> -}
> -
> -static inline void tmio_mmc_release_dma(struct tmio_mmc_host *host)
> -{
> -}
> -#endif
>  
>  #endif
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Parsons May 16, 2011, 9:49 p.m. UTC | #2
> NAK. Are you trying to use DMA with TMIO on your platform?

Not that I am aware of.

> Then this is a 
> wrong fix. Otherwise tmio_mmc_dma.c shouldn't be compiled
> on your arch at 
> all.

Then this must be is a config or Makefile bug, because the build is certainly trying to compile tmio_mmc_dma.c

Looking at drivers/mmc/host/Makefile:

ifneq ($(CONFIG_MMC_SDHI),n)
tmio_mmc_core-y                 += tmio_mmc_dma.o
endif

My config doesn't define CONFIG_MMC_SDHI at all, thus the Makefile adds tmio_mmc_dma.o to the build?

Regards,
Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guennadi Liakhovetski May 16, 2011, 10:01 p.m. UTC | #3
On Mon, 16 May 2011, Paul Parsons wrote:

> > NAK. Are you trying to use DMA with TMIO on your platform?
> 
> Not that I am aware of.
> 
> > Then this is a 
> > wrong fix. Otherwise tmio_mmc_dma.c shouldn't be compiled
> > on your arch at 
> > all.
> 
> Then this must be is a config or Makefile bug, because the build is 
> certainly trying to compile tmio_mmc_dma.c
> 
> Looking at drivers/mmc/host/Makefile:
> 
> ifneq ($(CONFIG_MMC_SDHI),n)
> tmio_mmc_core-y                 += tmio_mmc_dma.o
> endif
> 
> My config doesn't define CONFIG_MMC_SDHI at all, thus the Makefile adds tmio_mmc_dma.o to the build?

hm, interesting... Then yes, then this is a bug and should be fixed:( 
Although I'm sure I tested a non-SDHI build... confused.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff -uprN clean-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h linux-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h
--- clean-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h	2011-05-11 00:54:17.647289808 +0100
+++ linux-2.6.39-rc7/drivers/mmc/host/tmio_mmc.h	2011-05-14 16:30:47.208267896 +0100
@@ -98,26 +98,8 @@  static inline void tmio_mmc_kunmap_atomi
 	local_irq_restore(*flags);
 }
 
-#if defined(CONFIG_MMC_SDHI) || defined(CONFIG_MMC_SDHI_MODULE)
 void tmio_mmc_start_dma(struct tmio_mmc_host *host, struct mmc_data *data);
 void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdata);
 void tmio_mmc_release_dma(struct tmio_mmc_host *host);
-#else
-static inline void tmio_mmc_start_dma(struct tmio_mmc_host *host,
-			       struct mmc_data *data)
-{
-}
-
-static inline void tmio_mmc_request_dma(struct tmio_mmc_host *host,
-				 struct tmio_mmc_data *pdata)
-{
-	host->chan_tx = NULL;
-	host->chan_rx = NULL;
-}
-
-static inline void tmio_mmc_release_dma(struct tmio_mmc_host *host)
-{
-}
-#endif
 
 #endif