RE: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse [re-submit]

2011-07-16 Thread Kukjin Kim
Tushar Behera wrote:
> 
> On Monday 11 July 2011 09:53 PM, Sangwook Lee wrote:
> > Function declaration differs between file: dma.c and file:dma.h
> > and SPARSE (Documentation/sparse.txt) gives error messages
> >
> > All dma channels are members of 'enum dma_ch' and not 'unsigned int'
> > Please have a look at channel definitions in:
> > arch/arm/mach-s3c64xx/include/mach/dma.h
> > arch/arm/plat-samsung/include/plat/s3c-dma-pl330.h
> > arch/arm/mach-s3c2410/include/mach/dma.h
> > So all arguments should be of type 'enum dma_ch'
> >
> > Signed-off-by: Sangwook Lee
> > ---
> >   arch/arm/mach-s3c64xx/dma.c  |   14 +++---
> >   arch/arm/plat-s3c24xx/dma.c  |   12 ++--
> >   arch/arm/plat-samsung/dma.c  |6 +++---
> >   arch/arm/plat-samsung/include/plat/dma.h |   21 +++--
> >   4 files changed, 27 insertions(+), 26 deletions(-)
> >
> 
> Compilation is ok for following default configs.
> 
> s3c2410_defconfig
> s3c6400_defconfig
> s5p64x0_defconfig
> s5pc100_defconfig
> s5pv210_defconfig
> exynos4_defconfig
> 

Tushar, Thanks :)

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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


RE: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse [re-submit]

2011-07-16 Thread Kukjin Kim
Sangwook Lee wrote:
> 
> Function declaration differs between file: dma.c and file:dma.h
> and SPARSE (Documentation/sparse.txt) gives error messages
> 
> All dma channels are members of 'enum dma_ch' and not 'unsigned int'
> Please have a look at channel definitions in:
> arch/arm/mach-s3c64xx/include/mach/dma.h
> arch/arm/plat-samsung/include/plat/s3c-dma-pl330.h
> arch/arm/mach-s3c2410/include/mach/dma.h
> So all arguments should be of type 'enum dma_ch'
> 
> Signed-off-by: Sangwook Lee 
> ---
>  arch/arm/mach-s3c64xx/dma.c  |   14 +++---
>  arch/arm/plat-s3c24xx/dma.c  |   12 ++--
>  arch/arm/plat-samsung/dma.c  |6 +++---
>  arch/arm/plat-samsung/include/plat/dma.h |   21 +++--
>  4 files changed, 27 insertions(+), 26 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
> index b197171..204bfaf 100644
> --- a/arch/arm/mach-s3c64xx/dma.c
> +++ b/arch/arm/mach-s3c64xx/dma.c
> @@ -113,7 +113,7 @@ found:
>   return chan;
>  }
> 
> -int s3c2410_dma_config(unsigned int channel, int xferunit)
> +int s3c2410_dma_config(enum dma_ch channel, int xferunit)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
> 
> @@ -297,7 +297,7 @@ static int s3c64xx_dma_flush(struct s3c2410_dma_chan
> *chan)
>   return 0;
>  }
> 
> -int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)
> +int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
> 
> @@ -331,7 +331,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl);
>   *
>   */
> 
> -int s3c2410_dma_enqueue(unsigned int channel, void *id,
> +int s3c2410_dma_enqueue(enum dma_ch channel, void *id,
>   dma_addr_t data, int size)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
> @@ -415,7 +415,7 @@ err_buff:
>  EXPORT_SYMBOL(s3c2410_dma_enqueue);
> 
> 
> -int s3c2410_dma_devconfig(unsigned int channel,
> +int s3c2410_dma_devconfig(enum dma_ch channel,
> enum s3c2410_dmasrc source,
> unsigned long devaddr)
>  {
> @@ -463,7 +463,7 @@ int s3c2410_dma_devconfig(unsigned int channel,
>  EXPORT_SYMBOL(s3c2410_dma_devconfig);
> 
> 
> -int s3c2410_dma_getposition(unsigned int channel,
> +int s3c2410_dma_getposition(enum dma_ch channel,
>   dma_addr_t *src, dma_addr_t *dst)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
> @@ -487,7 +487,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition);
>   * get control of an dma channel
>  */
> 
> -int s3c2410_dma_request(unsigned int channel,
> +int s3c2410_dma_request(enum dma_ch channel,
>   struct s3c2410_dma_client *client,
>   void *dev)
>  {
> @@ -533,7 +533,7 @@ EXPORT_SYMBOL(s3c2410_dma_request);
>   * allowed to go through.
>  */
> 
> -int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client
*client)
> +int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client
*client)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
>   unsigned long flags;
> diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
> index 2abf966..623fba5 100644
> --- a/arch/arm/plat-s3c24xx/dma.c
> +++ b/arch/arm/plat-s3c24xx/dma.c
> @@ -712,7 +712,7 @@ static struct s3c2410_dma_chan
> *s3c2410_dma_map_channel(int channel);
>   * get control of an dma channel
>  */
> 
> -int s3c2410_dma_request(unsigned int channel,
> +int s3c2410_dma_request(enum dma_ch channel,
>   struct s3c2410_dma_client *client,
>   void *dev)
>  {
> @@ -783,7 +783,7 @@ EXPORT_SYMBOL(s3c2410_dma_request);
>   * allowed to go through.
>  */
> 
> -int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client
*client)
> +int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client
*client)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
>   unsigned long flags;
> @@ -974,7 +974,7 @@ static int s3c2410_dma_started(struct s3c2410_dma_chan
> *chan)
>  }
> 
>  int
> -s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)
> +s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
> 
> @@ -1021,7 +1021,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl);
>   * xfersize: size of unit in bytes (1,2,4)
>  */
> 
> -int s3c2410_dma_config(unsigned int channel,
> +int s3c2410_dma_config(enum dma_ch channel,
>  int xferunit)
>  {
>   struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
> @@ -1104,7 +1104,7 @@ EXPORT_SYMBOL(s3c2410_dma_config);
>   * devaddr:   physical address of the source
>  */
> 
> -int s3c2410_dma_devconfig(unsigned int channel,
> +int s3c2410_dma_devconfig(enum dma_ch channel,
> enum s3c2410_dma

Re: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse [re-submit]

2011-07-11 Thread Tushar Behera

On Monday 11 July 2011 09:53 PM, Sangwook Lee wrote:

Function declaration differs between file: dma.c and file:dma.h
and SPARSE (Documentation/sparse.txt) gives error messages

All dma channels are members of 'enum dma_ch' and not 'unsigned int'
Please have a look at channel definitions in:
arch/arm/mach-s3c64xx/include/mach/dma.h
arch/arm/plat-samsung/include/plat/s3c-dma-pl330.h
arch/arm/mach-s3c2410/include/mach/dma.h
So all arguments should be of type 'enum dma_ch'

Signed-off-by: Sangwook Lee
---
  arch/arm/mach-s3c64xx/dma.c  |   14 +++---
  arch/arm/plat-s3c24xx/dma.c  |   12 ++--
  arch/arm/plat-samsung/dma.c  |6 +++---
  arch/arm/plat-samsung/include/plat/dma.h |   21 +++--
  4 files changed, 27 insertions(+), 26 deletions(-)



Compilation is ok for following default configs.

s3c2410_defconfig
s3c6400_defconfig
s5p64x0_defconfig
s5pc100_defconfig
s5pv210_defconfig
exynos4_defconfig

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


[PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse [re-submit]

2011-07-11 Thread Sangwook Lee
Function declaration differs between file: dma.c and file:dma.h
and SPARSE (Documentation/sparse.txt) gives error messages

All dma channels are members of 'enum dma_ch' and not 'unsigned int'
Please have a look at channel definitions in:
arch/arm/mach-s3c64xx/include/mach/dma.h
arch/arm/plat-samsung/include/plat/s3c-dma-pl330.h
arch/arm/mach-s3c2410/include/mach/dma.h
So all arguments should be of type 'enum dma_ch'

Signed-off-by: Sangwook Lee 
---
 arch/arm/mach-s3c64xx/dma.c  |   14 +++---
 arch/arm/plat-s3c24xx/dma.c  |   12 ++--
 arch/arm/plat-samsung/dma.c  |6 +++---
 arch/arm/plat-samsung/include/plat/dma.h |   21 +++--
 4 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
index b197171..204bfaf 100644
--- a/arch/arm/mach-s3c64xx/dma.c
+++ b/arch/arm/mach-s3c64xx/dma.c
@@ -113,7 +113,7 @@ found:
return chan;
 }
 
-int s3c2410_dma_config(unsigned int channel, int xferunit)
+int s3c2410_dma_config(enum dma_ch channel, int xferunit)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
 
@@ -297,7 +297,7 @@ static int s3c64xx_dma_flush(struct s3c2410_dma_chan *chan)
return 0;
 }
 
-int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)
+int s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
 
@@ -331,7 +331,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl);
  *
  */
 
-int s3c2410_dma_enqueue(unsigned int channel, void *id,
+int s3c2410_dma_enqueue(enum dma_ch channel, void *id,
dma_addr_t data, int size)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
@@ -415,7 +415,7 @@ err_buff:
 EXPORT_SYMBOL(s3c2410_dma_enqueue);
 
 
-int s3c2410_dma_devconfig(unsigned int channel,
+int s3c2410_dma_devconfig(enum dma_ch channel,
  enum s3c2410_dmasrc source,
  unsigned long devaddr)
 {
@@ -463,7 +463,7 @@ int s3c2410_dma_devconfig(unsigned int channel,
 EXPORT_SYMBOL(s3c2410_dma_devconfig);
 
 
-int s3c2410_dma_getposition(unsigned int channel,
+int s3c2410_dma_getposition(enum dma_ch channel,
dma_addr_t *src, dma_addr_t *dst)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
@@ -487,7 +487,7 @@ EXPORT_SYMBOL(s3c2410_dma_getposition);
  * get control of an dma channel
 */
 
-int s3c2410_dma_request(unsigned int channel,
+int s3c2410_dma_request(enum dma_ch channel,
struct s3c2410_dma_client *client,
void *dev)
 {
@@ -533,7 +533,7 @@ EXPORT_SYMBOL(s3c2410_dma_request);
  * allowed to go through.
 */
 
-int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
+int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
unsigned long flags;
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 2abf966..623fba5 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -712,7 +712,7 @@ static struct s3c2410_dma_chan *s3c2410_dma_map_channel(int 
channel);
  * get control of an dma channel
 */
 
-int s3c2410_dma_request(unsigned int channel,
+int s3c2410_dma_request(enum dma_ch channel,
struct s3c2410_dma_client *client,
void *dev)
 {
@@ -783,7 +783,7 @@ EXPORT_SYMBOL(s3c2410_dma_request);
  * allowed to go through.
 */
 
-int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client)
+int s3c2410_dma_free(enum dma_ch channel, struct s3c2410_dma_client *client)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
unsigned long flags;
@@ -974,7 +974,7 @@ static int s3c2410_dma_started(struct s3c2410_dma_chan 
*chan)
 }
 
 int
-s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op)
+s3c2410_dma_ctrl(enum dma_ch channel, enum s3c2410_chan_op op)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
 
@@ -1021,7 +1021,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl);
  * xfersize: size of unit in bytes (1,2,4)
 */
 
-int s3c2410_dma_config(unsigned int channel,
+int s3c2410_dma_config(enum dma_ch channel,
   int xferunit)
 {
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
@@ -1104,7 +1104,7 @@ EXPORT_SYMBOL(s3c2410_dma_config);
  * devaddr:   physical address of the source
 */
 
-int s3c2410_dma_devconfig(unsigned int channel,
+int s3c2410_dma_devconfig(enum dma_ch channel,
  enum s3c2410_dmasrc source,
  unsigned long devaddr)
 {
@@ -1177,7 +1177,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig);
  * returns the current transfer points for the dma source and destination
 */
 
-int s3c2410_dma_getposit

Re: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse

2011-07-06 Thread Sangwook Lee
I can reproduce this errors and let me see how to fix those.


On 6 July 2011 07:08, Kukjin Kim  wrote:
> Kukjin Kim wrote:
>>
>> Sangwook Lee wrote:
>> >
>> > Function declaration differs between file:s3c-pl330.c and file:dma.h
>> > and SPARSE (Documentation/sparse.txt) gives error messages
>> >
>> > Signed-off-by: Sangwook Lee 
>> > ---
>> >  arch/arm/plat-samsung/include/plat/dma.h |   16 
>> >  1 files changed, 8 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/arch/arm/plat-samsung/include/plat/dma.h b/arch/arm/plat-
>> > samsung/include/plat/dma.h
>> > index 2e8f8c6..7365f46 100644
>> > --- a/arch/arm/plat-samsung/include/plat/dma.h
>> > +++ b/arch/arm/plat-samsung/include/plat/dma.h
>> > @@ -62,7 +62,7 @@ typedef int  (*s3c2410_dma_opfn_t)(struct
>> > s3c2410_dma_chan *,
>> >   * request a dma channel exclusivley
>> >  */
>> >
>> > -extern int s3c2410_dma_request(unsigned int channel,
>> > +extern int s3c2410_dma_request(enum dma_ch id,
>> >                            struct s3c2410_dma_client *, void *dev);
>> >
>> >
>> > @@ -71,14 +71,14 @@ extern int s3c2410_dma_request(unsigned int channel,
>> >   * change the state of the dma channel
>> >  */
>> >
>> > -extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op
> op);
>> > +extern int s3c2410_dma_ctrl(enum dma_ch id, enum s3c2410_chan_op op);
>> >
>> >  /* s3c2410_dma_setflags
>> >   *
>> >   * set the channel's flags to a given state
>> >  */
>> >
>> > -extern int s3c2410_dma_setflags(unsigned int channel,
>> > +extern int s3c2410_dma_setflags(enum dma_ch id,
>> >                             unsigned int flags);
>> >
>> >  /* s3c2410_dma_free
>> > @@ -86,7 +86,7 @@ extern int s3c2410_dma_setflags(unsigned int channel,
>> >   * free the dma channel (will also abort any outstanding operations)
>> >  */
>> >
>> > -extern int s3c2410_dma_free(unsigned int channel, struct
> s3c2410_dma_client *);
>> > +extern int s3c2410_dma_free(enum dma_ch id, struct s3c2410_dma_client
> *);
>> >
>> >  /* s3c2410_dma_enqueue
>> >   *
>> > @@ -95,7 +95,7 @@ extern int s3c2410_dma_free(unsigned int channel,
> struct
>> > s3c2410_dma_client *);
>> >   * drained before the buffer is given to the DMA system.
>> >  */
>> >
>> > -extern int s3c2410_dma_enqueue(unsigned int channel, void *id,
>> > +extern int s3c2410_dma_enqueue(enum dma_ch idx, void *id,
>> >                            dma_addr_t data, int size);
>> >
>> >  /* s3c2410_dma_config
>> > @@ -103,14 +103,14 @@ extern int s3c2410_dma_enqueue(unsigned int
> channel,
>> > void *id,
>> >   * configure the dma channel
>> >  */
>> >
>> > -extern int s3c2410_dma_config(unsigned int channel, int xferunit);
>> > +extern int s3c2410_dma_config(enum dma_ch id, int xferunit);
>> >
>> >  /* s3c2410_dma_devconfig
>> >   *
>> >   * configure the device we're talking to
>> >  */
>> >
>> > -extern int s3c2410_dma_devconfig(unsigned int channel,
>> > +extern int s3c2410_dma_devconfig(enum dma_ch id,
>> >             enum s3c2410_dmasrc source, unsigned long devaddr);
>> >
>> >  /* s3c2410_dma_getposition
>> > @@ -118,7 +118,7 @@ extern int s3c2410_dma_devconfig(unsigned int
> channel,
>> >   * get the position that the dma transfer is currently at
>> >  */
>> >
>> > -extern int s3c2410_dma_getposition(unsigned int channel,
>> > +extern int s3c2410_dma_getposition(enum dma_ch id,
>> >                                dma_addr_t *src, dma_addr_t *dest);
>> >
>> >  extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn);
>> > --
>
> Hi Sangwook Lee,
>
> I reverted this in my -fix tree just now because this makes following error
> with s3c2410_defconfig.
>
> arch/arm/plat-samsung/include/plat/dma.h:66: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:66: warning: its scope is only this
> definition or declaration, which is probably not what you want
> arch/arm/plat-samsung/include/plat/dma.h:74: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:82: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:89: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:99: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:106: warning: 'enum dma_ch'
> declared inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:114: warning: 'enum dma_ch'
> declared inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:122: warning: 'enum dma_ch'
> declared inside parameter list
> drivers/mmc/host/s3cmci.c: In function 'finalize_request':
> drivers/mmc/host/s3cmci.c:889: error: type of formal parameter 1 is
> incomplete
> drivers/mmc/host/s3cmci.c: In function 's3cmci_dma_setup':
> drivers/mmc/host/s3cmci.c:927: error: type of formal parameter 1 is
> incomplete
> drivers/mmc/host/s3cmci.c:930: error: type of formal parameter 1 is
> incomplete
> drivers/mmc/

Re: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse

2011-07-05 Thread Jassi Brar
On Wed, Jul 6, 2011 at 11:38 AM, Kukjin Kim  wrote:
> Kukjin Kim wrote:
>>
>> Sangwook Lee wrote:
>> >
>> > Function declaration differs between file:s3c-pl330.c and file:dma.h
>> > and SPARSE (Documentation/sparse.txt) gives error messages
>> >
>> > Signed-off-by: Sangwook Lee 
>> > ---
>> >  arch/arm/plat-samsung/include/plat/dma.h |   16 
>> >  1 files changed, 8 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/arch/arm/plat-samsung/include/plat/dma.h b/arch/arm/plat-
>> > samsung/include/plat/dma.h
>> > index 2e8f8c6..7365f46 100644
>> > --- a/arch/arm/plat-samsung/include/plat/dma.h
>> > +++ b/arch/arm/plat-samsung/include/plat/dma.h
>> > @@ -62,7 +62,7 @@ typedef int  (*s3c2410_dma_opfn_t)(struct
>> > s3c2410_dma_chan *,
>> >   * request a dma channel exclusivley
>> >  */
>> >
>> > -extern int s3c2410_dma_request(unsigned int channel,
>> > +extern int s3c2410_dma_request(enum dma_ch id,
>> >                            struct s3c2410_dma_client *, void *dev);
>> >
>> >
>> > @@ -71,14 +71,14 @@ extern int s3c2410_dma_request(unsigned int channel,
>> >   * change the state of the dma channel
>> >  */
>> >
>> > -extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op
> op);
>> > +extern int s3c2410_dma_ctrl(enum dma_ch id, enum s3c2410_chan_op op);
>> >
>> >  /* s3c2410_dma_setflags
>> >   *
>> >   * set the channel's flags to a given state
>> >  */
>> >
>> > -extern int s3c2410_dma_setflags(unsigned int channel,
>> > +extern int s3c2410_dma_setflags(enum dma_ch id,
>> >                             unsigned int flags);
>> >
>> >  /* s3c2410_dma_free
>> > @@ -86,7 +86,7 @@ extern int s3c2410_dma_setflags(unsigned int channel,
>> >   * free the dma channel (will also abort any outstanding operations)
>> >  */
>> >
>> > -extern int s3c2410_dma_free(unsigned int channel, struct
> s3c2410_dma_client *);
>> > +extern int s3c2410_dma_free(enum dma_ch id, struct s3c2410_dma_client
> *);
>> >
>> >  /* s3c2410_dma_enqueue
>> >   *
>> > @@ -95,7 +95,7 @@ extern int s3c2410_dma_free(unsigned int channel,
> struct
>> > s3c2410_dma_client *);
>> >   * drained before the buffer is given to the DMA system.
>> >  */
>> >
>> > -extern int s3c2410_dma_enqueue(unsigned int channel, void *id,
>> > +extern int s3c2410_dma_enqueue(enum dma_ch idx, void *id,
>> >                            dma_addr_t data, int size);
>> >
>> >  /* s3c2410_dma_config
>> > @@ -103,14 +103,14 @@ extern int s3c2410_dma_enqueue(unsigned int
> channel,
>> > void *id,
>> >   * configure the dma channel
>> >  */
>> >
>> > -extern int s3c2410_dma_config(unsigned int channel, int xferunit);
>> > +extern int s3c2410_dma_config(enum dma_ch id, int xferunit);
>> >
>> >  /* s3c2410_dma_devconfig
>> >   *
>> >   * configure the device we're talking to
>> >  */
>> >
>> > -extern int s3c2410_dma_devconfig(unsigned int channel,
>> > +extern int s3c2410_dma_devconfig(enum dma_ch id,
>> >             enum s3c2410_dmasrc source, unsigned long devaddr);
>> >
>> >  /* s3c2410_dma_getposition
>> > @@ -118,7 +118,7 @@ extern int s3c2410_dma_devconfig(unsigned int
> channel,
>> >   * get the position that the dma transfer is currently at
>> >  */
>> >
>> > -extern int s3c2410_dma_getposition(unsigned int channel,
>> > +extern int s3c2410_dma_getposition(enum dma_ch id,
>> >                                dma_addr_t *src, dma_addr_t *dest);
>> >
>> >  extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn);
>> > --
>
> Hi Sangwook Lee,
>
> I reverted this in my -fix tree just now because this makes following error
> with s3c2410_defconfig.

Sangwook's patch does the right thing.
IMO another patch to fix the following issues is needed.

>
> arch/arm/plat-samsung/include/plat/dma.h:66: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:66: warning: its scope is only this
> definition or declaration, which is probably not what you want
> arch/arm/plat-samsung/include/plat/dma.h:74: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:82: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:89: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:99: warning: 'enum dma_ch' declared
> inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:106: warning: 'enum dma_ch'
> declared inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:114: warning: 'enum dma_ch'
> declared inside parameter list
> arch/arm/plat-samsung/include/plat/dma.h:122: warning: 'enum dma_ch'
> declared inside parameter list
> drivers/mmc/host/s3cmci.c: In function 'finalize_request':
> drivers/mmc/host/s3cmci.c:889: error: type of formal parameter 1 is
> incomplete
> drivers/mmc/host/s3cmci.c: In function 's3cmci_dma_setup':
> drivers/mmc/host/s3cmci.c:927: error: type of formal parameter 1 is
> incomplete
> drivers/mmc/host/s3cmci.c:930: error: type of for

RE: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse

2011-07-05 Thread Kukjin Kim
Kukjin Kim wrote:
> 
> Sangwook Lee wrote:
> >
> > Function declaration differs between file:s3c-pl330.c and file:dma.h
> > and SPARSE (Documentation/sparse.txt) gives error messages
> >
> > Signed-off-by: Sangwook Lee 
> > ---
> >  arch/arm/plat-samsung/include/plat/dma.h |   16 
> >  1 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/arch/arm/plat-samsung/include/plat/dma.h b/arch/arm/plat-
> > samsung/include/plat/dma.h
> > index 2e8f8c6..7365f46 100644
> > --- a/arch/arm/plat-samsung/include/plat/dma.h
> > +++ b/arch/arm/plat-samsung/include/plat/dma.h
> > @@ -62,7 +62,7 @@ typedef int  (*s3c2410_dma_opfn_t)(struct
> > s3c2410_dma_chan *,
> >   * request a dma channel exclusivley
> >  */
> >
> > -extern int s3c2410_dma_request(unsigned int channel,
> > +extern int s3c2410_dma_request(enum dma_ch id,
> >struct s3c2410_dma_client *, void *dev);
> >
> >
> > @@ -71,14 +71,14 @@ extern int s3c2410_dma_request(unsigned int channel,
> >   * change the state of the dma channel
> >  */
> >
> > -extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op
op);
> > +extern int s3c2410_dma_ctrl(enum dma_ch id, enum s3c2410_chan_op op);
> >
> >  /* s3c2410_dma_setflags
> >   *
> >   * set the channel's flags to a given state
> >  */
> >
> > -extern int s3c2410_dma_setflags(unsigned int channel,
> > +extern int s3c2410_dma_setflags(enum dma_ch id,
> > unsigned int flags);
> >
> >  /* s3c2410_dma_free
> > @@ -86,7 +86,7 @@ extern int s3c2410_dma_setflags(unsigned int channel,
> >   * free the dma channel (will also abort any outstanding operations)
> >  */
> >
> > -extern int s3c2410_dma_free(unsigned int channel, struct
s3c2410_dma_client *);
> > +extern int s3c2410_dma_free(enum dma_ch id, struct s3c2410_dma_client
*);
> >
> >  /* s3c2410_dma_enqueue
> >   *
> > @@ -95,7 +95,7 @@ extern int s3c2410_dma_free(unsigned int channel,
struct
> > s3c2410_dma_client *);
> >   * drained before the buffer is given to the DMA system.
> >  */
> >
> > -extern int s3c2410_dma_enqueue(unsigned int channel, void *id,
> > +extern int s3c2410_dma_enqueue(enum dma_ch idx, void *id,
> >dma_addr_t data, int size);
> >
> >  /* s3c2410_dma_config
> > @@ -103,14 +103,14 @@ extern int s3c2410_dma_enqueue(unsigned int
channel,
> > void *id,
> >   * configure the dma channel
> >  */
> >
> > -extern int s3c2410_dma_config(unsigned int channel, int xferunit);
> > +extern int s3c2410_dma_config(enum dma_ch id, int xferunit);
> >
> >  /* s3c2410_dma_devconfig
> >   *
> >   * configure the device we're talking to
> >  */
> >
> > -extern int s3c2410_dma_devconfig(unsigned int channel,
> > +extern int s3c2410_dma_devconfig(enum dma_ch id,
> > enum s3c2410_dmasrc source, unsigned long devaddr);
> >
> >  /* s3c2410_dma_getposition
> > @@ -118,7 +118,7 @@ extern int s3c2410_dma_devconfig(unsigned int
channel,
> >   * get the position that the dma transfer is currently at
> >  */
> >
> > -extern int s3c2410_dma_getposition(unsigned int channel,
> > +extern int s3c2410_dma_getposition(enum dma_ch id,
> >dma_addr_t *src, dma_addr_t *dest);
> >
> >  extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn);
> > --

Hi Sangwook Lee,

I reverted this in my -fix tree just now because this makes following error
with s3c2410_defconfig.

arch/arm/plat-samsung/include/plat/dma.h:66: warning: 'enum dma_ch' declared
inside parameter list
arch/arm/plat-samsung/include/plat/dma.h:66: warning: its scope is only this
definition or declaration, which is probably not what you want
arch/arm/plat-samsung/include/plat/dma.h:74: warning: 'enum dma_ch' declared
inside parameter list
arch/arm/plat-samsung/include/plat/dma.h:82: warning: 'enum dma_ch' declared
inside parameter list
arch/arm/plat-samsung/include/plat/dma.h:89: warning: 'enum dma_ch' declared
inside parameter list
arch/arm/plat-samsung/include/plat/dma.h:99: warning: 'enum dma_ch' declared
inside parameter list
arch/arm/plat-samsung/include/plat/dma.h:106: warning: 'enum dma_ch'
declared inside parameter list
arch/arm/plat-samsung/include/plat/dma.h:114: warning: 'enum dma_ch'
declared inside parameter list
arch/arm/plat-samsung/include/plat/dma.h:122: warning: 'enum dma_ch'
declared inside parameter list
drivers/mmc/host/s3cmci.c: In function 'finalize_request':
drivers/mmc/host/s3cmci.c:889: error: type of formal parameter 1 is
incomplete
drivers/mmc/host/s3cmci.c: In function 's3cmci_dma_setup':
drivers/mmc/host/s3cmci.c:927: error: type of formal parameter 1 is
incomplete
drivers/mmc/host/s3cmci.c:930: error: type of formal parameter 1 is
incomplete
drivers/mmc/host/s3cmci.c:933: error: type of formal parameter 1 is
incomplete
drivers/mmc/host/s3cmci.c: In function 's3cmci_prepare_dma':
drivers/mmc/host/s3cmci.c:1091: error: type of formal parameter 1 is
incomplete
drivers/mmc/host/s3cmci.c:: error: type of formal paramete

RE: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse

2011-07-04 Thread Kukjin Kim
Sangwook Lee wrote:
> 
> Function declaration differs between file:s3c-pl330.c and file:dma.h
> and SPARSE (Documentation/sparse.txt) gives error messages
> 
> Signed-off-by: Sangwook Lee 
> ---
>  arch/arm/plat-samsung/include/plat/dma.h |   16 
>  1 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/include/plat/dma.h b/arch/arm/plat-
> samsung/include/plat/dma.h
> index 2e8f8c6..7365f46 100644
> --- a/arch/arm/plat-samsung/include/plat/dma.h
> +++ b/arch/arm/plat-samsung/include/plat/dma.h
> @@ -62,7 +62,7 @@ typedef int  (*s3c2410_dma_opfn_t)(struct
> s3c2410_dma_chan *,
>   * request a dma channel exclusivley
>  */
> 
> -extern int s3c2410_dma_request(unsigned int channel,
> +extern int s3c2410_dma_request(enum dma_ch id,
>  struct s3c2410_dma_client *, void *dev);
> 
> 
> @@ -71,14 +71,14 @@ extern int s3c2410_dma_request(unsigned int channel,
>   * change the state of the dma channel
>  */
> 
> -extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op
op);
> +extern int s3c2410_dma_ctrl(enum dma_ch id, enum s3c2410_chan_op op);
> 
>  /* s3c2410_dma_setflags
>   *
>   * set the channel's flags to a given state
>  */
> 
> -extern int s3c2410_dma_setflags(unsigned int channel,
> +extern int s3c2410_dma_setflags(enum dma_ch id,
>   unsigned int flags);
> 
>  /* s3c2410_dma_free
> @@ -86,7 +86,7 @@ extern int s3c2410_dma_setflags(unsigned int channel,
>   * free the dma channel (will also abort any outstanding operations)
>  */
> 
> -extern int s3c2410_dma_free(unsigned int channel, struct
s3c2410_dma_client *);
> +extern int s3c2410_dma_free(enum dma_ch id, struct s3c2410_dma_client *);
> 
>  /* s3c2410_dma_enqueue
>   *
> @@ -95,7 +95,7 @@ extern int s3c2410_dma_free(unsigned int channel, struct
> s3c2410_dma_client *);
>   * drained before the buffer is given to the DMA system.
>  */
> 
> -extern int s3c2410_dma_enqueue(unsigned int channel, void *id,
> +extern int s3c2410_dma_enqueue(enum dma_ch idx, void *id,
>  dma_addr_t data, int size);
> 
>  /* s3c2410_dma_config
> @@ -103,14 +103,14 @@ extern int s3c2410_dma_enqueue(unsigned int channel,
> void *id,
>   * configure the dma channel
>  */
> 
> -extern int s3c2410_dma_config(unsigned int channel, int xferunit);
> +extern int s3c2410_dma_config(enum dma_ch id, int xferunit);
> 
>  /* s3c2410_dma_devconfig
>   *
>   * configure the device we're talking to
>  */
> 
> -extern int s3c2410_dma_devconfig(unsigned int channel,
> +extern int s3c2410_dma_devconfig(enum dma_ch id,
>   enum s3c2410_dmasrc source, unsigned long devaddr);
> 
>  /* s3c2410_dma_getposition
> @@ -118,7 +118,7 @@ extern int s3c2410_dma_devconfig(unsigned int channel,
>   * get the position that the dma transfer is currently at
>  */
> 
> -extern int s3c2410_dma_getposition(unsigned int channel,
> +extern int s3c2410_dma_getposition(enum dma_ch id,
>  dma_addr_t *src, dma_addr_t *dest);
> 
>  extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn);
> --
> 1.7.4.1

OK, will apply.
Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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


Re: [PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse

2011-06-30 Thread Jassi Brar
On Thu, Jun 30, 2011 at 3:46 PM, Sangwook Lee  wrote:
> Function declaration differs between file:s3c-pl330.c and file:dma.h
> and SPARSE (Documentation/sparse.txt) gives error messages
>
> Signed-off-by: Sangwook Lee 

Acked-by: Jassi Brar 

> ---
>  arch/arm/plat-samsung/include/plat/dma.h |   16 
>  1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/include/plat/dma.h 
> b/arch/arm/plat-samsung/include/plat/dma.h
> index 2e8f8c6..7365f46 100644
> --- a/arch/arm/plat-samsung/include/plat/dma.h
> +++ b/arch/arm/plat-samsung/include/plat/dma.h
> @@ -62,7 +62,7 @@ typedef int  (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan 
> *,
>  * request a dma channel exclusivley
>  */
>
> -extern int s3c2410_dma_request(unsigned int channel,
> +extern int s3c2410_dma_request(enum dma_ch id,
>                               struct s3c2410_dma_client *, void *dev);
>
>
> @@ -71,14 +71,14 @@ extern int s3c2410_dma_request(unsigned int channel,
>  * change the state of the dma channel
>  */
>
> -extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op);
> +extern int s3c2410_dma_ctrl(enum dma_ch id, enum s3c2410_chan_op op);
>
>  /* s3c2410_dma_setflags
>  *
>  * set the channel's flags to a given state
>  */
>
> -extern int s3c2410_dma_setflags(unsigned int channel,
> +extern int s3c2410_dma_setflags(enum dma_ch id,
>                                unsigned int flags);
>
>  /* s3c2410_dma_free
> @@ -86,7 +86,7 @@ extern int s3c2410_dma_setflags(unsigned int channel,
>  * free the dma channel (will also abort any outstanding operations)
>  */
>
> -extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client 
> *);
> +extern int s3c2410_dma_free(enum dma_ch id, struct s3c2410_dma_client *);
>
>  /* s3c2410_dma_enqueue
>  *
> @@ -95,7 +95,7 @@ extern int s3c2410_dma_free(unsigned int channel, struct 
> s3c2410_dma_client *);
>  * drained before the buffer is given to the DMA system.
>  */
>
> -extern int s3c2410_dma_enqueue(unsigned int channel, void *id,
> +extern int s3c2410_dma_enqueue(enum dma_ch idx, void *id,
>                               dma_addr_t data, int size);
>
>  /* s3c2410_dma_config
> @@ -103,14 +103,14 @@ extern int s3c2410_dma_enqueue(unsigned int channel, 
> void *id,
>  * configure the dma channel
>  */
>
> -extern int s3c2410_dma_config(unsigned int channel, int xferunit);
> +extern int s3c2410_dma_config(enum dma_ch id, int xferunit);
>
>  /* s3c2410_dma_devconfig
>  *
>  * configure the device we're talking to
>  */
>
> -extern int s3c2410_dma_devconfig(unsigned int channel,
> +extern int s3c2410_dma_devconfig(enum dma_ch id,
>                enum s3c2410_dmasrc source, unsigned long devaddr);
>
>  /* s3c2410_dma_getposition
> @@ -118,7 +118,7 @@ extern int s3c2410_dma_devconfig(unsigned int channel,
>  * get the position that the dma transfer is currently at
>  */
>
> -extern int s3c2410_dma_getposition(unsigned int channel,
> +extern int s3c2410_dma_getposition(enum dma_ch id,
>                                   dma_addr_t *src, dma_addr_t *dest);
>
>  extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn);
> --
> 1.7.4.1
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM:SAMSUNG: DMA Cleanup as per sparse

2011-06-30 Thread Sangwook Lee
Function declaration differs between file:s3c-pl330.c and file:dma.h
and SPARSE (Documentation/sparse.txt) gives error messages

Signed-off-by: Sangwook Lee 
---
 arch/arm/plat-samsung/include/plat/dma.h |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/dma.h 
b/arch/arm/plat-samsung/include/plat/dma.h
index 2e8f8c6..7365f46 100644
--- a/arch/arm/plat-samsung/include/plat/dma.h
+++ b/arch/arm/plat-samsung/include/plat/dma.h
@@ -62,7 +62,7 @@ typedef int  (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *,
  * request a dma channel exclusivley
 */
 
-extern int s3c2410_dma_request(unsigned int channel,
+extern int s3c2410_dma_request(enum dma_ch id,
   struct s3c2410_dma_client *, void *dev);
 
 
@@ -71,14 +71,14 @@ extern int s3c2410_dma_request(unsigned int channel,
  * change the state of the dma channel
 */
 
-extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op);
+extern int s3c2410_dma_ctrl(enum dma_ch id, enum s3c2410_chan_op op);
 
 /* s3c2410_dma_setflags
  *
  * set the channel's flags to a given state
 */
 
-extern int s3c2410_dma_setflags(unsigned int channel,
+extern int s3c2410_dma_setflags(enum dma_ch id,
unsigned int flags);
 
 /* s3c2410_dma_free
@@ -86,7 +86,7 @@ extern int s3c2410_dma_setflags(unsigned int channel,
  * free the dma channel (will also abort any outstanding operations)
 */
 
-extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *);
+extern int s3c2410_dma_free(enum dma_ch id, struct s3c2410_dma_client *);
 
 /* s3c2410_dma_enqueue
  *
@@ -95,7 +95,7 @@ extern int s3c2410_dma_free(unsigned int channel, struct 
s3c2410_dma_client *);
  * drained before the buffer is given to the DMA system.
 */
 
-extern int s3c2410_dma_enqueue(unsigned int channel, void *id,
+extern int s3c2410_dma_enqueue(enum dma_ch idx, void *id,
   dma_addr_t data, int size);
 
 /* s3c2410_dma_config
@@ -103,14 +103,14 @@ extern int s3c2410_dma_enqueue(unsigned int channel, void 
*id,
  * configure the dma channel
 */
 
-extern int s3c2410_dma_config(unsigned int channel, int xferunit);
+extern int s3c2410_dma_config(enum dma_ch id, int xferunit);
 
 /* s3c2410_dma_devconfig
  *
  * configure the device we're talking to
 */
 
-extern int s3c2410_dma_devconfig(unsigned int channel,
+extern int s3c2410_dma_devconfig(enum dma_ch id,
enum s3c2410_dmasrc source, unsigned long devaddr);
 
 /* s3c2410_dma_getposition
@@ -118,7 +118,7 @@ extern int s3c2410_dma_devconfig(unsigned int channel,
  * get the position that the dma transfer is currently at
 */
 
-extern int s3c2410_dma_getposition(unsigned int channel,
+extern int s3c2410_dma_getposition(enum dma_ch id,
   dma_addr_t *src, dma_addr_t *dest);
 
 extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn);
-- 
1.7.4.1

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