diff mbox

[U-Boot,6/6] nds32: adp-ag102: use 'faraday/ftpci100.h' for pci_ftpci_init

Message ID 1369563091-21640-7-git-send-email-juhosg@openwrt.org
State Accepted
Delegated to: Macpaul Lin
Headers show

Commit Message

Gabor Juhos May 26, 2013, 10:11 a.m. UTC
Due to improper external function declaration,
building U-Boot for the adp-ag102 board shows
this warning:

  adp-ag102.c: In function 'pci_init_board':
  adp-ag102.c:95: warning: function declaration isn't a prototype

Include the 'faraday/ftpci100.h' header which
provides the proper declaration and remove the
local declaration to get rid of the warning.

Compile tested only.

Cc: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
 board/AndesTech/adp-ag102/adp-ag102.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Macpaul Lin July 24, 2013, 4:47 a.m. UTC | #1
Hi Gabor,

2013/5/26 Gabor Juhos <juhosg@openwrt.org>:
> Due to improper external function declaration,
> building U-Boot for the adp-ag102 board shows
> this warning:
>
>   adp-ag102.c: In function 'pci_init_board':
>   adp-ag102.c:95: warning: function declaration isn't a prototype
>
> Include the 'faraday/ftpci100.h' header which
> provides the proper declaration and remove the
> local declaration to get rid of the warning.
>
> Compile tested only.

Applied to u-boot-nds32/master
Thanks for your help!
diff mbox

Patch

diff --git a/board/AndesTech/adp-ag102/adp-ag102.c b/board/AndesTech/adp-ag102/adp-ag102.c
index 5a25632..1b56dac 100644
--- a/board/AndesTech/adp-ag102/adp-ag102.c
+++ b/board/AndesTech/adp-ag102/adp-ag102.c
@@ -25,6 +25,7 @@ 
 #include <netdev.h>
 #include <asm/io.h>
 
+#include <faraday/ftpci100.h>
 #include <faraday/ftsdc010.h>
 #ifdef CONFIG_FTSMC020
 #include <faraday/ftsmc020.h>
@@ -92,8 +93,6 @@  ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
 void pci_init_board(void)
 {
 	/* should be pci_ftpci100_init() */
-	extern void pci_ftpci_init();
-
 	pci_ftpci_init();
 }
 #endif