mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] mtd: core: Fix compilation warning.
@ 2012-03-22 21:05 Marek Belisko
  2012-03-22 21:05 ` [PATCH 2/2] pxa27x_udc: " Marek Belisko
  2012-03-23  8:28 ` [PATCH 1/2] mtd: core: " Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Marek Belisko @ 2012-03-22 21:05 UTC (permalink / raw)
  To: barebox; +Cc: Marek Belisko

Fix following warning:
drivers/mtd/core.c: In function 'mtd_ioctl':
drivers/mtd/core.c:122:24: warning: unused variable 'ecc'

Found in at91rm9200ek_defconfig.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/mtd/core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index ccc5c26..e11ba64 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -119,7 +119,6 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 	int ret = 0;
 	struct mtd_info *mtd = cdev->priv;
 	struct mtd_info_user *user = buf;
-	struct mtd_ecc_stats *ecc = buf;
 	struct region_info_user *reg = buf;
 
 	switch (request) {
@@ -146,6 +145,8 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 		break;
 #if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
 	case ECCGETSTATS:
+		struct mtd_ecc_stats *ecc = buf;
+
 		ecc->corrected = mtd->ecc_stats.corrected;
 		ecc->failed = mtd->ecc_stats.failed;
 		ecc->badblocks = mtd->ecc_stats.badblocks;
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/2] pxa27x_udc: Fix compilation warning.
  2012-03-22 21:05 [PATCH 1/2] mtd: core: Fix compilation warning Marek Belisko
@ 2012-03-22 21:05 ` Marek Belisko
  2012-03-23  8:30   ` Sascha Hauer
  2012-03-23  8:28 ` [PATCH 1/2] mtd: core: " Sascha Hauer
  1 sibling, 1 reply; 5+ messages in thread
From: Marek Belisko @ 2012-03-22 21:05 UTC (permalink / raw)
  To: barebox; +Cc: Marek Belisko

Fix following:
drivers/usb/gadget/pxa27x_udc.c:1482:1: warning: initialization from incompatible pointer type

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/usb/gadget/pxa27x_udc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 5652555..26be29d 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -1473,9 +1473,9 @@ static struct pxa_udc memory = {
 	}
 };
 
-static int pxa27x_udc_poller(struct poller_struct *poller)
+static void pxa27x_udc_poller(struct poller_struct *poller)
 {
-	return usb_gadget_poll();
+	usb_gadget_poll();
 }
 static struct poller_struct poller = {
 	.func		= pxa27x_udc_poller
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] mtd: core: Fix compilation warning.
  2012-03-22 21:05 [PATCH 1/2] mtd: core: Fix compilation warning Marek Belisko
  2012-03-22 21:05 ` [PATCH 2/2] pxa27x_udc: " Marek Belisko
@ 2012-03-23  8:28 ` Sascha Hauer
  2012-03-23  8:31   ` Belisko Marek
  1 sibling, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2012-03-23  8:28 UTC (permalink / raw)
  To: Marek Belisko; +Cc: barebox

On Thu, Mar 22, 2012 at 10:05:17PM +0100, Marek Belisko wrote:
> Fix following warning:
> drivers/mtd/core.c: In function 'mtd_ioctl':
> drivers/mtd/core.c:122:24: warning: unused variable 'ecc'
> 
> Found in at91rm9200ek_defconfig.
> 
> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
> ---
>  drivers/mtd/core.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
> index ccc5c26..e11ba64 100644
> --- a/drivers/mtd/core.c
> +++ b/drivers/mtd/core.c
> @@ -119,7 +119,6 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
>  	int ret = 0;
>  	struct mtd_info *mtd = cdev->priv;
>  	struct mtd_info_user *user = buf;
> -	struct mtd_ecc_stats *ecc = buf;
>  	struct region_info_user *reg = buf;
>  
>  	switch (request) {
> @@ -146,6 +145,8 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
>  		break;
>  #if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
>  	case ECCGETSTATS:
> +		struct mtd_ecc_stats *ecc = buf;
> +

Won't that introduce a new warning about mixed code and declarations?

Sascha

>  		ecc->corrected = mtd->ecc_stats.corrected;
>  		ecc->failed = mtd->ecc_stats.failed;
>  		ecc->badblocks = mtd->ecc_stats.badblocks;
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/2] pxa27x_udc: Fix compilation warning.
  2012-03-22 21:05 ` [PATCH 2/2] pxa27x_udc: " Marek Belisko
@ 2012-03-23  8:30   ` Sascha Hauer
  0 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2012-03-23  8:30 UTC (permalink / raw)
  To: Marek Belisko; +Cc: barebox

On Thu, Mar 22, 2012 at 10:05:18PM +0100, Marek Belisko wrote:
> Fix following:
> drivers/usb/gadget/pxa27x_udc.c:1482:1: warning: initialization from incompatible pointer type
> 
> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>

Applied, thanks

Sascha

> ---
>  drivers/usb/gadget/pxa27x_udc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
> index 5652555..26be29d 100644
> --- a/drivers/usb/gadget/pxa27x_udc.c
> +++ b/drivers/usb/gadget/pxa27x_udc.c
> @@ -1473,9 +1473,9 @@ static struct pxa_udc memory = {
>  	}
>  };
>  
> -static int pxa27x_udc_poller(struct poller_struct *poller)
> +static void pxa27x_udc_poller(struct poller_struct *poller)
>  {
> -	return usb_gadget_poll();
> +	usb_gadget_poll();
>  }
>  static struct poller_struct poller = {
>  	.func		= pxa27x_udc_poller
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] mtd: core: Fix compilation warning.
  2012-03-23  8:28 ` [PATCH 1/2] mtd: core: " Sascha Hauer
@ 2012-03-23  8:31   ` Belisko Marek
  0 siblings, 0 replies; 5+ messages in thread
From: Belisko Marek @ 2012-03-23  8:31 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On Fri, Mar 23, 2012 at 9:28 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Thu, Mar 22, 2012 at 10:05:17PM +0100, Marek Belisko wrote:
>> Fix following warning:
>> drivers/mtd/core.c: In function 'mtd_ioctl':
>> drivers/mtd/core.c:122:24: warning: unused variable 'ecc'
>>
>> Found in at91rm9200ek_defconfig.
>>
>> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
>> ---
>>  drivers/mtd/core.c |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
>> index ccc5c26..e11ba64 100644
>> --- a/drivers/mtd/core.c
>> +++ b/drivers/mtd/core.c
>> @@ -119,7 +119,6 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
>>       int ret = 0;
>>       struct mtd_info *mtd = cdev->priv;
>>       struct mtd_info_user *user = buf;
>> -     struct mtd_ecc_stats *ecc = buf;
>>       struct region_info_user *reg = buf;
>>
>>       switch (request) {
>> @@ -146,6 +145,8 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
>>               break;
>>  #if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
>>       case ECCGETSTATS:
>> +             struct mtd_ecc_stats *ecc = buf;
>> +
>
> Won't that introduce a new warning about mixed code and declarations?
I know C don't like such a construction but my CodeSourcery (2009q1)
compiler don't
give me any warning after that change. Maybe newer one will do.
>
> Sascha
>
>>               ecc->corrected = mtd->ecc_stats.corrected;
>>               ecc->failed = mtd->ecc_stats.failed;
>>               ecc->badblocks = mtd->ecc_stats.badblocks;
>> --
>> 1.7.5.4
>>
>>
>> _______________________________________________
>> barebox mailing list
>> barebox@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/barebox
>>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-03-23  8:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-22 21:05 [PATCH 1/2] mtd: core: Fix compilation warning Marek Belisko
2012-03-22 21:05 ` [PATCH 2/2] pxa27x_udc: " Marek Belisko
2012-03-23  8:30   ` Sascha Hauer
2012-03-23  8:28 ` [PATCH 1/2] mtd: core: " Sascha Hauer
2012-03-23  8:31   ` Belisko Marek

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