diff mbox

[v2] mtd: atmel_nand: fix the compile error which miss label "err_ecc_ioremap".

Message ID 1347347412-24214-1-git-send-email-josh.wu@atmel.com
State New, archived
Headers show

Commit Message

Josh Wu Sept. 11, 2012, 7:10 a.m. UTC
Add err_ecc_ioremap label to fix following errors:
---8<--- 
  CC      drivers/mtd/nand/atmel_nand.o
drivers/mtd/nand/atmel_nand.c: In function 'atmel_nand_probe':
drivers/mtd/nand/atmel_nand.c:1423: error: label 'err_ecc_ioremap' used but not defined
make[3]: *** [drivers/mtd/nand/atmel_nand.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2
--->8---

This error was introduced in b654a9a46fc2100b318050483f8c5b5d0f187303 (mtd: atmel nand: fix gpio missing request)

Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
change logs:
  Add detail information for the commit message.

 drivers/mtd/nand/atmel_nand.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Josh Wu Sept. 20, 2012, 2:03 a.m. UTC | #1
Hi, Artem

Do you have any feedback since there is a long time about this patch?

Best Regards,
Josh Wu

On 9/11/2012 3:10 PM, Josh Wu wrote:
> Add err_ecc_ioremap label to fix following errors:
> ---8<---
>    CC      drivers/mtd/nand/atmel_nand.o
> drivers/mtd/nand/atmel_nand.c: In function 'atmel_nand_probe':
> drivers/mtd/nand/atmel_nand.c:1423: error: label 'err_ecc_ioremap' used but not defined
> make[3]: *** [drivers/mtd/nand/atmel_nand.o] Error 1
> make[2]: *** [drivers/mtd/nand] Error 2
> make[1]: *** [drivers/mtd] Error 2
> make: *** [drivers] Error 2
> --->8---
>
> This error was introduced in b654a9a46fc2100b318050483f8c5b5d0f187303 (mtd: atmel nand: fix gpio missing request)
>
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---
> change logs:
>    Add detail information for the commit message.
>
>   drivers/mtd/nand/atmel_nand.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
> index 6a5a35b..9144557 100644
> --- a/drivers/mtd/nand/atmel_nand.c
> +++ b/drivers/mtd/nand/atmel_nand.c
> @@ -1399,7 +1399,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
>   	if (pdev->dev.of_node) {
>   		res = atmel_of_init_port(host, pdev->dev.of_node);
>   		if (res)
> -			goto err_nand_ioremap;
> +			goto err_ecc_ioremap;
>   	} else {
>   		memcpy(&host->board, pdev->dev.platform_data,
>   		       sizeof(struct atmel_nand_data));
> @@ -1560,6 +1560,7 @@ err_no_card:
>   	platform_set_drvdata(pdev, NULL);
>   	if (host->dma_chan)
>   		dma_release_channel(host->dma_chan);
> +err_ecc_ioremap:
>   	iounmap(host->io_base);
>   err_nand_ioremap:
>   	kfree(host);
Jean-Christophe PLAGNIOL-VILLARD Sept. 20, 2012, 5:23 a.m. UTC | #2
On 15:10 Tue 11 Sep     , Josh Wu wrote:
> Add err_ecc_ioremap label to fix following errors:
> ---8<--- 
>   CC      drivers/mtd/nand/atmel_nand.o
> drivers/mtd/nand/atmel_nand.c: In function 'atmel_nand_probe':
> drivers/mtd/nand/atmel_nand.c:1423: error: label 'err_ecc_ioremap' used but not defined
> make[3]: *** [drivers/mtd/nand/atmel_nand.o] Error 1
> make[2]: *** [drivers/mtd/nand] Error 2
> make[1]: *** [drivers/mtd] Error 2
> make: *** [drivers] Error 2
> --->8---
switch to devm_xxx instead this will simplify the error patch and remove patch

Best Regards,
J.
Nicolas Ferre Sept. 20, 2012, 8:20 a.m. UTC | #3
On 09/20/2012 07:23 AM, Jean-Christophe PLAGNIOL-VILLARD :
> On 15:10 Tue 11 Sep     , Josh Wu wrote:
>> Add err_ecc_ioremap label to fix following errors:
>> ---8<--- 
>>   CC      drivers/mtd/nand/atmel_nand.o
>> drivers/mtd/nand/atmel_nand.c: In function 'atmel_nand_probe':
>> drivers/mtd/nand/atmel_nand.c:1423: error: label 'err_ecc_ioremap' used but not defined
>> make[3]: *** [drivers/mtd/nand/atmel_nand.o] Error 1
>> make[2]: *** [drivers/mtd/nand] Error 2
>> make[1]: *** [drivers/mtd] Error 2
>> make: *** [drivers] Error 2
>> --->8---
> switch to devm_xxx instead this will simplify the error patch and remove patch

As far as I understand, it is a correction patch: so my advice would be
to take this patch for fixing the current code (for 3.7 if I recall well).
If we want to move to the new devm_xxx API, we can do it once the
current code is fixed.

Bye,
Josh Wu Sept. 21, 2012, 10:16 a.m. UTC | #4
Hi, J.C

On 9/20/2012 1:23 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 15:10 Tue 11 Sep     , Josh Wu wrote:
>> Add err_ecc_ioremap label to fix following errors:
>> ---8<---
>>    CC      drivers/mtd/nand/atmel_nand.o
>> drivers/mtd/nand/atmel_nand.c: In function 'atmel_nand_probe':
>> drivers/mtd/nand/atmel_nand.c:1423: error: label 'err_ecc_ioremap' used but not defined
>> make[3]: *** [drivers/mtd/nand/atmel_nand.o] Error 1
>> make[2]: *** [drivers/mtd/nand] Error 2
>> make[1]: *** [drivers/mtd] Error 2
>> make: *** [drivers] Error 2
>> --->8---
> switch to devm_xxx instead this will simplify the error patch and remove patch

understood. I will push a patch  which use devm_xxx. That should remove 
many code of the error handling. Thanks

Best Regards,
Josh Wu

>
> Best Regards,
> J.
Artem Bityutskiy Sept. 23, 2012, 12:41 p.m. UTC | #5
On Tue, 2012-09-11 at 15:10 +0800, Josh Wu wrote:
> Add err_ecc_ioremap label to fix following errors:
> ---8<--- 
>   CC      drivers/mtd/nand/atmel_nand.o
> drivers/mtd/nand/atmel_nand.c: In function 'atmel_nand_probe':
> drivers/mtd/nand/atmel_nand.c:1423: error: label 'err_ecc_ioremap' used but not defined
> make[3]: *** [drivers/mtd/nand/atmel_nand.o] Error 1
> make[2]: *** [drivers/mtd/nand] Error 2
> make[1]: *** [drivers/mtd] Error 2
> make: *** [drivers] Error 2
> --->8---

Pushed to l2-mtd.git, thanks!
Artem Bityutskiy Sept. 23, 2012, 1:01 p.m. UTC | #6
On Sun, 2012-09-23 at 15:41 +0300, Artem Bityutskiy wrote:
> On Tue, 2012-09-11 at 15:10 +0800, Josh Wu wrote:
> > Add err_ecc_ioremap label to fix following errors:
> > ---8<--- 
> >   CC      drivers/mtd/nand/atmel_nand.o
> > drivers/mtd/nand/atmel_nand.c: In function 'atmel_nand_probe':
> > drivers/mtd/nand/atmel_nand.c:1423: error: label 'err_ecc_ioremap' used but not defined
> > make[3]: *** [drivers/mtd/nand/atmel_nand.o] Error 1
> > make[2]: *** [drivers/mtd/nand] Error 2
> > make[1]: *** [drivers/mtd] Error 2
> > make: *** [drivers] Error 2
> > --->8---
> 
> Pushed to l2-mtd.git, thanks!

Actually squashed it into the bogus patch.
diff mbox

Patch

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 6a5a35b..9144557 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1399,7 +1399,7 @@  static int __init atmel_nand_probe(struct platform_device *pdev)
 	if (pdev->dev.of_node) {
 		res = atmel_of_init_port(host, pdev->dev.of_node);
 		if (res)
-			goto err_nand_ioremap;
+			goto err_ecc_ioremap;
 	} else {
 		memcpy(&host->board, pdev->dev.platform_data,
 		       sizeof(struct atmel_nand_data));
@@ -1560,6 +1560,7 @@  err_no_card:
 	platform_set_drvdata(pdev, NULL);
 	if (host->dma_chan)
 		dma_release_channel(host->dma_chan);
+err_ecc_ioremap:
 	iounmap(host->io_base);
 err_nand_ioremap:
 	kfree(host);