diff mbox

[v2,6/6] mmc: omap_hsmmc: split omap-dma header file

Message ID 1399654013-28262-7-git-send-email-balajitk@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Balaji T K May 9, 2014, 4:46 p.m. UTC
moving dmaengine consumer specific function to omap-dmaengine.h
to Resolve build failure seen with sh-allmodconfig:
    include/linux/omap-dma.h:171:8: error: expected identifier before numeric constant
    make[4]: *** [drivers/mmc/host/omap_hsmmc.o] Error 1

Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c  |    2 +-
 include/linux/omap-dma.h       |   19 +------------------
 include/linux/omap-dmaengine.h |   21 +++++++++++++++++++++
 3 files changed, 23 insertions(+), 19 deletions(-)
 create mode 100644 include/linux/omap-dmaengine.h

Comments

Balaji T K May 15, 2014, 1:38 p.m. UTC | #1
On Friday 09 May 2014 10:16 PM, Balaji T K wrote:
> moving dmaengine consumer specific function to omap-dmaengine.h
> to Resolve build failure seen with sh-allmodconfig:
>      include/linux/omap-dma.h:171:8: error: expected identifier before numeric constant
>      make[4]: *** [drivers/mmc/host/omap_hsmmc.o] Error 1
>
> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Balaji T K <balajitk@ti.com>

Hi Russell, Tony,

Since this patches touches omap dma header file,
can you provide your comments / ack if it looks ok ?

> ---
>   drivers/mmc/host/omap_hsmmc.c  |    2 +-
>   include/linux/omap-dma.h       |   19 +------------------
>   include/linux/omap-dmaengine.h |   21 +++++++++++++++++++++
>   3 files changed, 23 insertions(+), 19 deletions(-)
>   create mode 100644 include/linux/omap-dmaengine.h
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index cba71d6..6b7b755 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -31,7 +31,7 @@
>   #include <linux/of.h>
>   #include <linux/of_gpio.h>
>   #include <linux/of_device.h>
> -#include <linux/omap-dma.h>
> +#include <linux/omap-dmaengine.h>
>   #include <linux/mmc/host.h>
>   #include <linux/mmc/core.h>
>   #include <linux/mmc/mmc.h>
> diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
> index 41a13e7..999f52d 100644
> --- a/include/linux/omap-dma.h
> +++ b/include/linux/omap-dma.h
> @@ -1,23 +1,6 @@
> -/*
> - * OMAP DMA Engine support
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
>   #ifndef __LINUX_OMAP_DMA_H
>   #define __LINUX_OMAP_DMA_H
> -
> -struct dma_chan;
> -
> -#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
> -bool omap_dma_filter_fn(struct dma_chan *, void *);
> -#else
> -static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
> -{
> -	return false;
> -}
> -#endif
> +#include <linux/omap-dmaengine.h>
>
>   /*
>    *  Legacy OMAP DMA handling defines and functions
> diff --git a/include/linux/omap-dmaengine.h b/include/linux/omap-dmaengine.h
> new file mode 100644
> index 0000000..2b0b6aa
> --- /dev/null
> +++ b/include/linux/omap-dmaengine.h
> @@ -0,0 +1,21 @@
> +/*
> + * OMAP DMA Engine support
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +#ifndef __LINUX_OMAP_DMAENGINE_H
> +#define __LINUX_OMAP_DMAENGINE_H
> +
> +struct dma_chan;
> +
> +#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
> +bool omap_dma_filter_fn(struct dma_chan *, void *);
> +#else
> +static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
> +{
> +	return false;
> +}
> +#endif
> +#endif /* __LINUX_OMAP_DMAENGINE_H */
>

--
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
Tony Lindgren May 16, 2014, 9:41 p.m. UTC | #2
* Balaji T K <balajitk@ti.com> [140509 09:47]:
> moving dmaengine consumer specific function to omap-dmaengine.h
> to Resolve build failure seen with sh-allmodconfig:
>     include/linux/omap-dma.h:171:8: error: expected identifier before numeric constant
>     make[4]: *** [drivers/mmc/host/omap_hsmmc.o] Error 1
> 
> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Balaji T K <balajitk@ti.com>
> ---
>  drivers/mmc/host/omap_hsmmc.c  |    2 +-
>  include/linux/omap-dma.h       |   19 +------------------
>  include/linux/omap-dmaengine.h |   21 +++++++++++++++++++++
>  3 files changed, 23 insertions(+), 19 deletions(-)
>  create mode 100644 include/linux/omap-dmaengine.h
> 
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index cba71d6..6b7b755 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -31,7 +31,7 @@
>  #include <linux/of.h>
>  #include <linux/of_gpio.h>
>  #include <linux/of_device.h>
> -#include <linux/omap-dma.h>
> +#include <linux/omap-dmaengine.h>
>  #include <linux/mmc/host.h>
>  #include <linux/mmc/core.h>
>  #include <linux/mmc/mmc.h>
> diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
> index 41a13e7..999f52d 100644
> --- a/include/linux/omap-dma.h
> +++ b/include/linux/omap-dma.h
> @@ -1,23 +1,6 @@
> -/*
> - * OMAP DMA Engine support
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
>  #ifndef __LINUX_OMAP_DMA_H
>  #define __LINUX_OMAP_DMA_H
> -
> -struct dma_chan;
> -
> -#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
> -bool omap_dma_filter_fn(struct dma_chan *, void *);
> -#else
> -static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
> -{
> -	return false;
> -}
> -#endif
> +#include <linux/omap-dmaengine.h>

Can't the drivers needing this include it directly?

Also, has this been tested with make randconfig? Changes like
this can easily cause problems elsewhere..

Regards,

Tony
  
>  /*
>   *  Legacy OMAP DMA handling defines and functions
> diff --git a/include/linux/omap-dmaengine.h b/include/linux/omap-dmaengine.h
> new file mode 100644
> index 0000000..2b0b6aa
> --- /dev/null
> +++ b/include/linux/omap-dmaengine.h
> @@ -0,0 +1,21 @@
> +/*
> + * OMAP DMA Engine support
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +#ifndef __LINUX_OMAP_DMAENGINE_H
> +#define __LINUX_OMAP_DMAENGINE_H
> +
> +struct dma_chan;
> +
> +#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
> +bool omap_dma_filter_fn(struct dma_chan *, void *);
> +#else
> +static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
> +{
> +	return false;
> +}
> +#endif
> +#endif /* __LINUX_OMAP_DMAENGINE_H */
> -- 
> 1.7.5.4
> 
--
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
Balaji T K May 19, 2014, 11:53 a.m. UTC | #3
On Saturday 17 May 2014 03:11 AM, Tony Lindgren wrote:
> * Balaji T K <balajitk@ti.com> [140509 09:47]:
>> moving dmaengine consumer specific function to omap-dmaengine.h
>> to Resolve build failure seen with sh-allmodconfig:
>>      include/linux/omap-dma.h:171:8: error: expected identifier before numeric constant
>>      make[4]: *** [drivers/mmc/host/omap_hsmmc.o] Error 1
>>
>> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Signed-off-by: Balaji T K <balajitk@ti.com>
>> ---
>>   drivers/mmc/host/omap_hsmmc.c  |    2 +-
>>   include/linux/omap-dma.h       |   19 +------------------
>>   include/linux/omap-dmaengine.h |   21 +++++++++++++++++++++
>>   3 files changed, 23 insertions(+), 19 deletions(-)
>>   create mode 100644 include/linux/omap-dmaengine.h
>>
>> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
>> index cba71d6..6b7b755 100644
>> --- a/drivers/mmc/host/omap_hsmmc.c
>> +++ b/drivers/mmc/host/omap_hsmmc.c
>> @@ -31,7 +31,7 @@
>>   #include <linux/of.h>
>>   #include <linux/of_gpio.h>
>>   #include <linux/of_device.h>
>> -#include <linux/omap-dma.h>
>> +#include <linux/omap-dmaengine.h>
>>   #include <linux/mmc/host.h>
>>   #include <linux/mmc/core.h>
>>   #include <linux/mmc/mmc.h>
>> diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
>> index 41a13e7..999f52d 100644
>> --- a/include/linux/omap-dma.h
>> +++ b/include/linux/omap-dma.h
>> @@ -1,23 +1,6 @@
>> -/*
>> - * OMAP DMA Engine support
>> - *
>> - * This program is free software; you can redistribute it and/or modify
>> - * it under the terms of the GNU General Public License version 2 as
>> - * published by the Free Software Foundation.
>> - */
>>   #ifndef __LINUX_OMAP_DMA_H
>>   #define __LINUX_OMAP_DMA_H
>> -
>> -struct dma_chan;
>> -
>> -#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
>> -bool omap_dma_filter_fn(struct dma_chan *, void *);
>> -#else
>> -static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
>> -{
>> -	return false;
>> -}
>> -#endif
>> +#include <linux/omap-dmaengine.h>
>
> Can't the drivers needing this include it directly?
>

Yes, I have converted omap_hsmmc as part of this patch.
Due to lack of bandwidth, I haven't touched upon all other drivers that include
omap-dma.h. Once that is done in other subsystem after this patch gets merged,
this include can then be removed from omap-dma.h

> Also, has this been tested with make randconfig? Changes like
> this can easily cause problems elsewhere..

May be I am missing something, Can you please elaborate ?
This patch is based on the discussion [1]
I just moved the dma consumer specific things needed by users
to a separate file and include the same file in place so that other users
can be converted one at a time.

[1]
https://lkml.org/lkml/2014/1/19/16
>
> Regards,
>
> Tony
>
>>   /*
>>    *  Legacy OMAP DMA handling defines and functions
>> diff --git a/include/linux/omap-dmaengine.h b/include/linux/omap-dmaengine.h
>> new file mode 100644
>> index 0000000..2b0b6aa
>> --- /dev/null
>> +++ b/include/linux/omap-dmaengine.h
>> @@ -0,0 +1,21 @@
>> +/*
>> + * OMAP DMA Engine support
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +#ifndef __LINUX_OMAP_DMAENGINE_H
>> +#define __LINUX_OMAP_DMAENGINE_H
>> +
>> +struct dma_chan;
>> +
>> +#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
>> +bool omap_dma_filter_fn(struct dma_chan *, void *);
>> +#else
>> +static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
>> +{
>> +	return false;
>> +}
>> +#endif
>> +#endif /* __LINUX_OMAP_DMAENGINE_H */
>> --
>> 1.7.5.4
>>

--
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
Tony Lindgren May 19, 2014, 4:54 p.m. UTC | #4
* Balaji T K <balajitk@ti.com> [140519 04:54]:
> On Saturday 17 May 2014 03:11 AM, Tony Lindgren wrote:
> >>-
> >>-#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
> >>-bool omap_dma_filter_fn(struct dma_chan *, void *);
> >>-#else
> >>-static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
> >>-{
> >>-	return false;
> >>-}
> >>-#endif
> >>+#include <linux/omap-dmaengine.h>
> >
> >Can't the drivers needing this include it directly?
> >
> 
> Yes, I have converted omap_hsmmc as part of this patch.
> Due to lack of bandwidth, I haven't touched upon all other drivers that include
> omap-dma.h. Once that is done in other subsystem after this patch gets merged,
> this include can then be removed from omap-dma.h

OK
 
> >Also, has this been tested with make randconfig? Changes like
> >this can easily cause problems elsewhere..
> 
> May be I am missing something, Can you please elaborate ?

You're touching a header included in many places, so you
need to make sure you're not accidentally breaking anything.

There's an option that allows you to specify some selected
options like CONFIG_ARCH_OMAP2PLUS=y with KCONFIG_ALLCONFIG
and then run make randconfig. This should expose quite fast
if there are some issues for the other drivers.

Also, have you compile tested this with omap1_defconfig?

Regards,

Tony
--
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
Balaji T K May 20, 2014, 1:28 p.m. UTC | #5
On Monday 19 May 2014 10:24 PM, Tony Lindgren wrote:
> * Balaji T K <balajitk@ti.com> [140519 04:54]:
>> On Saturday 17 May 2014 03:11 AM, Tony Lindgren wrote:
>>>> -
>>>> -#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
>>>> -bool omap_dma_filter_fn(struct dma_chan *, void *);
>>>> -#else
>>>> -static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
>>>> -{
>>>> -	return false;
>>>> -}
>>>> -#endif
>>>> +#include <linux/omap-dmaengine.h>
>>>
>>> Can't the drivers needing this include it directly?
>>>
>>
>> Yes, I have converted omap_hsmmc as part of this patch.
>> Due to lack of bandwidth, I haven't touched upon all other drivers that include
>> omap-dma.h. Once that is done in other subsystem after this patch gets merged,
>> this include can then be removed from omap-dma.h
>
> OK
>
>>> Also, has this been tested with make randconfig? Changes like
>>> this can easily cause problems elsewhere..
>>
>> May be I am missing something, Can you please elaborate ?
>
> You're touching a header included in many places, so you
> need to make sure you're not accidentally breaking anything.
>

True

> There's an option that allows you to specify some selected
> options like CONFIG_ARCH_OMAP2PLUS=y with KCONFIG_ALLCONFIG
> and then run make randconfig. This should expose quite fast
> if there are some issues for the other drivers.
>
> Also, have you compile tested this with omap1_defconfig?
>

checked omap1_defconfig and randconfig's, both are OK.

Thanks and Regards,
Balaji T K
--
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
Tony Lindgren May 20, 2014, 2:50 p.m. UTC | #6
* Balaji T K <balajitk@ti.com> [140520 06:29]:
> On Monday 19 May 2014 10:24 PM, Tony Lindgren wrote:
> >* Balaji T K <balajitk@ti.com> [140519 04:54]:
> >>On Saturday 17 May 2014 03:11 AM, Tony Lindgren wrote:
> >>>>-
> >>>>-#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
> >>>>-bool omap_dma_filter_fn(struct dma_chan *, void *);
> >>>>-#else
> >>>>-static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
> >>>>-{
> >>>>-	return false;
> >>>>-}
> >>>>-#endif
> >>>>+#include <linux/omap-dmaengine.h>
> >>>
> >>>Can't the drivers needing this include it directly?
> >>>
> >>
> >>Yes, I have converted omap_hsmmc as part of this patch.
> >>Due to lack of bandwidth, I haven't touched upon all other drivers that include
> >>omap-dma.h. Once that is done in other subsystem after this patch gets merged,
> >>this include can then be removed from omap-dma.h
> >
> >OK
> >
> >>>Also, has this been tested with make randconfig? Changes like
> >>>this can easily cause problems elsewhere..
> >>
> >>May be I am missing something, Can you please elaborate ?
> >
> >You're touching a header included in many places, so you
> >need to make sure you're not accidentally breaking anything.
> >
> 
> True
> 
> >There's an option that allows you to specify some selected
> >options like CONFIG_ARCH_OMAP2PLUS=y with KCONFIG_ALLCONFIG
> >and then run make randconfig. This should expose quite fast
> >if there are some issues for the other drivers.
> >
> >Also, have you compile tested this with omap1_defconfig?
> >
> 
> checked omap1_defconfig and randconfig's, both are OK.

OK thanks:

Acked-by: Tony Lindgren <tony@atomide.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
diff mbox

Patch

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index cba71d6..6b7b755 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -31,7 +31,7 @@ 
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 #include <linux/of_device.h>
-#include <linux/omap-dma.h>
+#include <linux/omap-dmaengine.h>
 #include <linux/mmc/host.h>
 #include <linux/mmc/core.h>
 #include <linux/mmc/mmc.h>
diff --git a/include/linux/omap-dma.h b/include/linux/omap-dma.h
index 41a13e7..999f52d 100644
--- a/include/linux/omap-dma.h
+++ b/include/linux/omap-dma.h
@@ -1,23 +1,6 @@ 
-/*
- * OMAP DMA Engine support
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
 #ifndef __LINUX_OMAP_DMA_H
 #define __LINUX_OMAP_DMA_H
-
-struct dma_chan;
-
-#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
-bool omap_dma_filter_fn(struct dma_chan *, void *);
-#else
-static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
-{
-	return false;
-}
-#endif
+#include <linux/omap-dmaengine.h>
 
 /*
  *  Legacy OMAP DMA handling defines and functions
diff --git a/include/linux/omap-dmaengine.h b/include/linux/omap-dmaengine.h
new file mode 100644
index 0000000..2b0b6aa
--- /dev/null
+++ b/include/linux/omap-dmaengine.h
@@ -0,0 +1,21 @@ 
+/*
+ * OMAP DMA Engine support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __LINUX_OMAP_DMAENGINE_H
+#define __LINUX_OMAP_DMAENGINE_H
+
+struct dma_chan;
+
+#if defined(CONFIG_DMA_OMAP) || defined(CONFIG_DMA_OMAP_MODULE)
+bool omap_dma_filter_fn(struct dma_chan *, void *);
+#else
+static inline bool omap_dma_filter_fn(struct dma_chan *c, void *d)
+{
+	return false;
+}
+#endif
+#endif /* __LINUX_OMAP_DMAENGINE_H */