* [PATCH] MIPS: ath79: fix compilation error when CONFIG_PCI is disabled
@ 2014-10-19 17:43 Stefan Hengelein
2014-10-20 7:18 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hengelein @ 2014-10-19 17:43 UTC (permalink / raw)
To: linux-mips; +Cc: linux-kernel, ralf, Stefan Hengelein
When CONFIG_PCI is disabled, 'db120_pci_init()' had a different
signature than when was enabled. Therefore, compilation failed when
CONFIG_PCI was not present.
arch/mips/ath79/mach-db120.c:132: error: too many arguments to function 'db120_pci_init'
Signed-off-by: Stefan Hengelein <stefan.hengelein@fau.de>
---
arch/mips/ath79/mach-db120.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/ath79/mach-db120.c b/arch/mips/ath79/mach-db120.c
index 4d661a1..d1a783d 100644
--- a/arch/mips/ath79/mach-db120.c
+++ b/arch/mips/ath79/mach-db120.c
@@ -112,8 +112,6 @@ static void __init db120_pci_init(u8 *eeprom)
ath79_pci_set_plat_dev_init(db120_pci_plat_dev_init);
ath79_register_pci();
}
-#else
-static inline void db120_pci_init(void) {}
#endif /* CONFIG_PCI */
static void __init db120_setup(void)
@@ -129,7 +127,9 @@ static void __init db120_setup(void)
ARRAY_SIZE(db120_spi_info));
ath79_register_usb();
ath79_register_wmac(art + DB120_WMAC_CALDATA_OFFSET);
+#ifdef CONFIG_PCI
db120_pci_init(art + DB120_PCIE_CALDATA_OFFSET);
+#endif
}
MIPS_MACHINE(ATH79_MACH_DB120, "DB120", "Atheros DB120 reference board",
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: ath79: fix compilation error when CONFIG_PCI is disabled
2014-10-19 17:43 [PATCH] MIPS: ath79: fix compilation error when CONFIG_PCI is disabled Stefan Hengelein
@ 2014-10-20 7:18 ` Geert Uytterhoeven
2014-10-20 13:11 ` Stefan Hengelein
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-10-20 7:18 UTC (permalink / raw)
To: Stefan Hengelein; +Cc: Linux MIPS Mailing List, linux-kernel, Ralf Baechle
On Sun, Oct 19, 2014 at 7:43 PM, Stefan Hengelein
<stefan.hengelein@fau.de> wrote:
> When CONFIG_PCI is disabled, 'db120_pci_init()' had a different
> signature than when was enabled. Therefore, compilation failed when
> CONFIG_PCI was not present.
>
> arch/mips/ath79/mach-db120.c:132: error: too many arguments to function 'db120_pci_init'
>
> Signed-off-by: Stefan Hengelein <stefan.hengelein@fau.de>
> ---
> arch/mips/ath79/mach-db120.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/ath79/mach-db120.c b/arch/mips/ath79/mach-db120.c
> index 4d661a1..d1a783d 100644
> --- a/arch/mips/ath79/mach-db120.c
> +++ b/arch/mips/ath79/mach-db120.c
> @@ -112,8 +112,6 @@ static void __init db120_pci_init(u8 *eeprom)
> ath79_pci_set_plat_dev_init(db120_pci_plat_dev_init);
> ath79_register_pci();
> }
> -#else
> -static inline void db120_pci_init(void) {}
Please fix the prototype above, instead of removing it and its caller.
> #endif /* CONFIG_PCI */
>
> static void __init db120_setup(void)
> @@ -129,7 +127,9 @@ static void __init db120_setup(void)
> ARRAY_SIZE(db120_spi_info));
> ath79_register_usb();
> ath79_register_wmac(art + DB120_WMAC_CALDATA_OFFSET);
> +#ifdef CONFIG_PCI
> db120_pci_init(art + DB120_PCIE_CALDATA_OFFSET);
> +#endif
> }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] MIPS: ath79: fix compilation error when CONFIG_PCI is disabled
2014-10-20 7:18 ` Geert Uytterhoeven
@ 2014-10-20 13:11 ` Stefan Hengelein
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hengelein @ 2014-10-20 13:11 UTC (permalink / raw)
To: linux-mips; +Cc: linux-kernel, ralf, geert, Stefan Hengelein
When CONFIG_PCI is disabled, 'db120_pci_init()' had a different
signature than when was enabled. Therefore, compilation failed when
CONFIG_PCI was not present.
arch/mips/ath79/mach-db120.c:132: error: too many arguments to function 'db120_pci_init'
This error was found with vampyr.
Signed-off-by: Stefan Hengelein <stefan.hengelein@fau.de>
---
Changelog:
v2: fix prototype instead of removing the caller
---
arch/mips/ath79/mach-db120.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/ath79/mach-db120.c b/arch/mips/ath79/mach-db120.c
index 4d661a1..9423f5a 100644
--- a/arch/mips/ath79/mach-db120.c
+++ b/arch/mips/ath79/mach-db120.c
@@ -113,7 +113,7 @@ static void __init db120_pci_init(u8 *eeprom)
ath79_register_pci();
}
#else
-static inline void db120_pci_init(void) {}
+static inline void db120_pci_init(u8 *eeprom) {}
#endif /* CONFIG_PCI */
static void __init db120_setup(void)
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-20 13:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-19 17:43 [PATCH] MIPS: ath79: fix compilation error when CONFIG_PCI is disabled Stefan Hengelein
2014-10-20 7:18 ` Geert Uytterhoeven
2014-10-20 13:11 ` Stefan Hengelein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).