public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
@ 2012-02-06 12:54 Prabhakar Lad
  2012-02-06 13:00 ` Dirk Behme
  2012-02-06 13:39 ` Thierry Reding
  0 siblings, 2 replies; 8+ messages in thread
From: Prabhakar Lad @ 2012-02-06 12:54 UTC (permalink / raw)
  To: u-boot

Fix build error for mx6qarm2 board due to prototype change
for function  board_mmc_getcd().
mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd'
u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd' was here

Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
index 9894245..2cb37dd 100644
--- a/board/freescale/mx6qarm2/mx6qarm2.c
+++ b/board/freescale/mx6qarm2/mx6qarm2.c
@@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
 	{USDHC4_BASE_ADDR, 1},
 };
 
-int board_mmc_getcd(u8 *cd, struct mmc *mmc)
+int board_mmc_getcd(struct mmc *mmc)
 {
 	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
+	int ret = 0;
 
 	if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
 		gpio_direction_input(171); /*GPIO6_11*/
-		*cd = gpio_get_value(171);
-	} else /* Don't have the CD GPIO pin on board */
-		*cd = 0;
+		ret = !gpio_get_value(171);
+	}
 
-	return 0;
+	return ret;
 }
 
 int board_mmc_init(bd_t *bis)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
  2012-02-06 12:54 [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd() Prabhakar Lad
@ 2012-02-06 13:00 ` Dirk Behme
  2012-02-06 13:07   ` Prabhakar Lad
  2012-02-06 13:39 ` Thierry Reding
  1 sibling, 1 reply; 8+ messages in thread
From: Dirk Behme @ 2012-02-06 13:00 UTC (permalink / raw)
  To: u-boot

On 06.02.2012 13:54, Prabhakar Lad wrote:
> Fix build error for mx6qarm2 board due to prototype change
> for function  board_mmc_getcd().
> mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd'
> u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd' was here
> 
> Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
> ---
>  board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
> index 9894245..2cb37dd 100644
> --- a/board/freescale/mx6qarm2/mx6qarm2.c
> +++ b/board/freescale/mx6qarm2/mx6qarm2.c
> @@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
>  	{USDHC4_BASE_ADDR, 1},
>  };
>  
> -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
> +int board_mmc_getcd(struct mmc *mmc)
>  {
>  	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
> +	int ret = 0;
>  
>  	if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
>  		gpio_direction_input(171); /*GPIO6_11*/
> -		*cd = gpio_get_value(171);
> -	} else /* Don't have the CD GPIO pin on board */
> -		*cd = 0;
> +		ret = !gpio_get_value(171);
> +	}
>  
> -	return 0;
> +	return ret;
>  }
>  
>  int board_mmc_init(bd_t *bis)

This should be fixed already at u-boot-imx.git:

http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=e669db1c209eed02ca8c837914c161f5daa2d8fd

Please check.

Best regards

Dirk

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
  2012-02-06 13:00 ` Dirk Behme
@ 2012-02-06 13:07   ` Prabhakar Lad
  0 siblings, 0 replies; 8+ messages in thread
From: Prabhakar Lad @ 2012-02-06 13:07 UTC (permalink / raw)
  To: u-boot

Dirk,

My bad didn't notice it.

WBR,
--Prabhakar Lad

On Mon, Feb 6, 2012 at 6:30 PM, Dirk Behme <dirk.behme@de.bosch.com> wrote:

> On 06.02.2012 13:54, Prabhakar Lad wrote:
>
>> Fix build error for mx6qarm2 board due to prototype change
>> for function  board_mmc_getcd().
>> mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd'
>> u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd'
>> was here
>>
>> Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
>> ---
>>  board/freescale/mx6qarm2/**mx6qarm2.c |   10 +++++-----
>>  1 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/board/freescale/mx6qarm2/**mx6qarm2.c
>> b/board/freescale/mx6qarm2/**mx6qarm2.c
>> index 9894245..2cb37dd 100644
>> --- a/board/freescale/mx6qarm2/**mx6qarm2.c
>> +++ b/board/freescale/mx6qarm2/**mx6qarm2.c
>> @@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
>>        {USDHC4_BASE_ADDR, 1},
>>  };
>>  -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
>> +int board_mmc_getcd(struct mmc *mmc)
>>  {
>>        struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
>> +       int ret = 0;
>>        if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
>>                gpio_direction_input(171); /*GPIO6_11*/
>> -               *cd = gpio_get_value(171);
>> -       } else /* Don't have the CD GPIO pin on board */
>> -               *cd = 0;
>> +               ret = !gpio_get_value(171);
>> +       }
>>  -      return 0;
>> +       return ret;
>>  }
>>  int board_mmc_init(bd_t *bis)
>>
>
> This should be fixed already at u-boot-imx.git:
>
> http://git.denx.de/?p=u-boot/**u-boot-imx.git;a=commitdiff;h=**
> e669db1c209eed02ca8c837914c161**f5daa2d8fd<http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=e669db1c209eed02ca8c837914c161f5daa2d8fd>
>
> Please check.
>
> Best regards
>
> Dirk
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
  2012-02-06 12:54 [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd() Prabhakar Lad
  2012-02-06 13:00 ` Dirk Behme
@ 2012-02-06 13:39 ` Thierry Reding
  2012-02-06 14:03   ` Prabhakar Lad
  1 sibling, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2012-02-06 13:39 UTC (permalink / raw)
  To: u-boot

* Prabhakar Lad wrote:
> Fix build error for mx6qarm2 board due to prototype change
> for function  board_mmc_getcd().
> mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd'
> u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd' was here
> 
> Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
> ---
>  board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/board/freescale/mx6qarm2/mx6qarm2.c b/board/freescale/mx6qarm2/mx6qarm2.c
> index 9894245..2cb37dd 100644
> --- a/board/freescale/mx6qarm2/mx6qarm2.c
> +++ b/board/freescale/mx6qarm2/mx6qarm2.c
> @@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
>  	{USDHC4_BASE_ADDR, 1},
>  };
>  
> -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
> +int board_mmc_getcd(struct mmc *mmc)
>  {
>  	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
> +	int ret = 0;
>  
>  	if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
>  		gpio_direction_input(171); /*GPIO6_11*/
                                           ^^^^^^^^^^^^
Could you fix up this comment at the same time (put spaces after /* and
before */)?

> -		*cd = gpio_get_value(171);
> -	} else /* Don't have the CD GPIO pin on board */
> -		*cd = 0;
> +		ret = !gpio_get_value(171);
> +	}
>  
> -	return 0;
> +	return ret;
>  }

Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120206/805f68f7/attachment.pgp>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
  2012-02-06 13:39 ` Thierry Reding
@ 2012-02-06 14:03   ` Prabhakar Lad
  2012-02-06 14:14     ` Thierry Reding
  0 siblings, 1 reply; 8+ messages in thread
From: Prabhakar Lad @ 2012-02-06 14:03 UTC (permalink / raw)
  To: u-boot

Thierry,

On 2/6/12, Thierry Reding <thierry.reding@avionic-design.de> wrote:
> * Prabhakar Lad wrote:
>> Fix build error for mx6qarm2 board due to prototype change
>> for function  board_mmc_getcd().
>> mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd'
>> u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd'
>> was here
>>
>> Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
>> ---
>>  board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
>>  1 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/board/freescale/mx6qarm2/mx6qarm2.c
>> b/board/freescale/mx6qarm2/mx6qarm2.c
>> index 9894245..2cb37dd 100644
>> --- a/board/freescale/mx6qarm2/mx6qarm2.c
>> +++ b/board/freescale/mx6qarm2/mx6qarm2.c
>> @@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
>>  	{USDHC4_BASE_ADDR, 1},
>>  };
>>
>> -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
>> +int board_mmc_getcd(struct mmc *mmc)
>>  {
>>  	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
>> +	int ret = 0;
>>
>>  	if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
>>  		gpio_direction_input(171); /*GPIO6_11*/
>                                            ^^^^^^^^^^^^
> Could you fix up this comment at the same time (put spaces after /* and
> before */)?
>
The patch for this fix already submitted, shall submit independent
patch with this fix?

WBR,
--Prabhakar Lad

>> -		*cd = gpio_get_value(171);
>> -	} else /* Don't have the CD GPIO pin on board */
>> -		*cd = 0;
>> +		ret = !gpio_get_value(171);
>> +	}
>>
>> -	return 0;
>> +	return ret;
>>  }
>
> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
  2012-02-06 14:03   ` Prabhakar Lad
@ 2012-02-06 14:14     ` Thierry Reding
  2012-02-07  5:00       ` Prabhakar Lad
  0 siblings, 1 reply; 8+ messages in thread
From: Thierry Reding @ 2012-02-06 14:14 UTC (permalink / raw)
  To: u-boot

* Prabhakar Lad wrote:
> Thierry,
> 
> On 2/6/12, Thierry Reding <thierry.reding@avionic-design.de> wrote:
> > * Prabhakar Lad wrote:
> >> Fix build error for mx6qarm2 board due to prototype change
> >> for function  board_mmc_getcd().
> >> mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd'
> >> u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd'
> >> was here
> >>
> >> Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
> >> ---
> >>  board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
> >>  1 files changed, 5 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/board/freescale/mx6qarm2/mx6qarm2.c
> >> b/board/freescale/mx6qarm2/mx6qarm2.c
> >> index 9894245..2cb37dd 100644
> >> --- a/board/freescale/mx6qarm2/mx6qarm2.c
> >> +++ b/board/freescale/mx6qarm2/mx6qarm2.c
> >> @@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
> >>  	{USDHC4_BASE_ADDR, 1},
> >>  };
> >>
> >> -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
> >> +int board_mmc_getcd(struct mmc *mmc)
> >>  {
> >>  	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
> >> +	int ret = 0;
> >>
> >>  	if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
> >>  		gpio_direction_input(171); /*GPIO6_11*/
> >                                            ^^^^^^^^^^^^
> > Could you fix up this comment at the same time (put spaces after /* and
> > before */)?
> >
> The patch for this fix already submitted, shall submit independent
> patch with this fix?

If it hasn't been applied to any of the upstream repositories yet, then you
can always send an updated version.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120206/c8f33369/attachment.pgp>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
  2012-02-06 14:14     ` Thierry Reding
@ 2012-02-07  5:00       ` Prabhakar Lad
  2012-02-07  7:22         ` Thierry Reding
  0 siblings, 1 reply; 8+ messages in thread
From: Prabhakar Lad @ 2012-02-07  5:00 UTC (permalink / raw)
  To: u-boot

Thierry,

On Mon, Feb 6, 2012 at 7:44 PM, Thierry Reding <
thierry.reding@avionic-design.de> wrote:

> * Prabhakar Lad wrote:
> > Thierry,
> >
> > On 2/6/12, Thierry Reding <thierry.reding@avionic-design.de> wrote:
> > > * Prabhakar Lad wrote:
> > >> Fix build error for mx6qarm2 board due to prototype change
> > >> for function  board_mmc_getcd().
> > >> mx6qarm2.c:123: error: conflicting types for 'board_mmc_getcd'
> > >> u-boot/include/mmc.h:318: note: previous declaration of
> 'board_mmc_getcd'
> > >> was here
> > >>
> > >> Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
> > >> ---
> > >>  board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
> > >>  1 files changed, 5 insertions(+), 5 deletions(-)
> > >>
> > >> diff --git a/board/freescale/mx6qarm2/mx6qarm2.c
> > >> b/board/freescale/mx6qarm2/mx6qarm2.c
> > >> index 9894245..2cb37dd 100644
> > >> --- a/board/freescale/mx6qarm2/mx6qarm2.c
> > >> +++ b/board/freescale/mx6qarm2/mx6qarm2.c
> > >> @@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
> > >>    {USDHC4_BASE_ADDR, 1},
> > >>  };
> > >>
> > >> -int board_mmc_getcd(u8 *cd, struct mmc *mmc)
> > >> +int board_mmc_getcd(struct mmc *mmc)
> > >>  {
> > >>    struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
> > >> +  int ret = 0;
> > >>
> > >>    if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
> > >>            gpio_direction_input(171); /*GPIO6_11*/
> > >                                            ^^^^^^^^^^^^
> > > Could you fix up this comment at the same time (put spaces after /* and
> > > before */)?
> > >
> > The patch for this fix already submitted, shall submit independent
> > patch with this fix?
>
> If it hasn't been applied to any of the upstream repositories yet, then you
> can always send an updated version.
>
   The patch is already accepted by the maintainer,

http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=e669db1c209eed02ca8c837914c161f5daa2d8fd
   so ill drop this fix.

 WBR,
 --Prabhakar Lad

>
> Thierry
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd()
  2012-02-07  5:00       ` Prabhakar Lad
@ 2012-02-07  7:22         ` Thierry Reding
  0 siblings, 0 replies; 8+ messages in thread
From: Thierry Reding @ 2012-02-07  7:22 UTC (permalink / raw)
  To: u-boot

* Prabhakar Lad wrote:
>    The patch is already accepted by the maintainer,
> 
> http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=e669db1c209eed02ca8c837914c161f5daa2d8fd
>    so ill drop this fix.

Okay, no problem.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120207/c4e8af6b/attachment.pgp>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-07  7:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-06 12:54 [U-Boot] [PATCH] mx6qarm2: fix build error for board_mmc_getcd() Prabhakar Lad
2012-02-06 13:00 ` Dirk Behme
2012-02-06 13:07   ` Prabhakar Lad
2012-02-06 13:39 ` Thierry Reding
2012-02-06 14:03   ` Prabhakar Lad
2012-02-06 14:14     ` Thierry Reding
2012-02-07  5:00       ` Prabhakar Lad
2012-02-07  7:22         ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox