Skip to contentSkip to conversation

mx6qarm2: fix build error for board_mmc_getcd()

PATCH New Prabhakar Lad 3 participants 8 messages Feb 6, 2012 – Feb 7, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

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

---
 board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +5 -5
index 9894245..2cb37dd 100644
@@ -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)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

Quoted 27 lines · Prabhakar Lad

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

---
 board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +2 -2
index 9894245..2cb37dd 100644
@@ -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);

board/freescale/mx6qarm2/mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 136

Quoted 10 lines
board/freescale/mx6qarm2/mx6qarm2.c +3 -3
-	} 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

#2 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

Dirk,

My bad didn't notice it.

WBR,
--Prabhakar Lad

Quoted 50 lines · Dirk Behme
Quoted 26 lines · Prabhakar Lad

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

---
 board/freescale/mx6qarm2/**mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/**mx6qarm2.c +2 -0
index 9894245..2cb37dd 100644
@@ -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*/

board/freescale/mx6qarm2/**mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 135

Quoted 10 lines
board/freescale/mx6qarm2/**mx6qarm2.c +3 -3
-               *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

#3 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

In reply to Prabhakar Lad
Quoted 16 lines · Prabhakar Lad

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

---
 board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +0 -0
index 9894245..2cb37dd 100644
@@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
 	{USDHC4_BASE_ADDR, 1},

board/freescale/mx6qarm2/mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 129

Quoted 10 lines
board/freescale/mx6qarm2/mx6qarm2.c +2 -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 */)?

board/freescale/mx6qarm2/mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 134

Quoted 9 lines
board/freescale/mx6qarm2/mx6qarm2.c +3 -4
-		*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;
 }

-------------- 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>

#4 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

Thierry,

Quoted 27 lines · Thierry Reding
Quoted 26 lines · Prabhakar Lad

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

---
 board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +2 -1
index 9894245..2cb37dd 100644
@@ -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;
 
Quoted 6 lines

board/freescale/mx6qarm2/mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 129

Quoted 2 lines
board/freescale/mx6qarm2/mx6qarm2.c +0 -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

Quoted 12 lines

board/freescale/mx6qarm2/mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 134

Quoted 9 lines
board/freescale/mx6qarm2/mx6qarm2.c +3 -4
-		*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;
 }
#5 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

Quoted 30 lines · Prabhakar Lad

Thierry,

Quoted 27 lines · Thierry Reding
Quoted 26 lines · Prabhakar Lad

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

---
 board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +2 -1
index 9894245..2cb37dd 100644
@@ -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;
 
Quoted 8 lines
Quoted 6 lines

board/freescale/mx6qarm2/mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 129

Quoted 2 lines
board/freescale/mx6qarm2/mx6qarm2.c +0 -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>

#6 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

Thierry,

Quoted 38 lines · Thierry Reding
Quoted 8 lines · Prabhakar Lad

Thierry,

Quoted 5 lines · Thierry Reding
Quoted 4 lines · Prabhakar Lad

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'

Quoted 28 lines
Quoted 28 lines
Quoted 14 lines

was here

---
 board/freescale/mx6qarm2/mx6qarm2.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +0 -0
index 9894245..2cb37dd 100644
@@ -120,17 +120,17 @@ struct fsl_esdhc_cfg usdhc_cfg[2] = {
   {USDHC4_BASE_ADDR, 1},

board/freescale/mx6qarm2/mx6qarm2.c struct fsl_esdhc_cfg usdhc_cfg[2] = { · line 129

Quoted 10 lines
board/freescale/mx6qarm2/mx6qarm2.c +2 -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 */)?

Quoted 6 lines
Quoted 2 lines

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

Quoted 3 lines

Thierry

#7 lore raw

PATCH 1/1 mx6qarm2: fix build error for board_mmc_getcd()

Quoted 4 lines · Prabhakar Lad

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>