LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* undefined reference to fixed_phy_add, from of_add_fixed_phys
@ 2008-02-27 10:58 Olaf Hering
  2008-02-27 11:07 ` Adrian Bunk
  2008-02-27 15:07 ` [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y Adrian Bunk
  0 siblings, 2 replies; 5+ messages in thread
From: Olaf Hering @ 2008-02-27 10:58 UTC (permalink / raw)
  To: linux-kernel

Hello,

can anyone explain why linking fails?
I dont see whats so special about fixed_phy_add(). 

olaf@lingonberry:/dev/shm/R/linux-2.6.25-rc3> time env LC_ALL=C make -kj8 O=../O-25 vmlinux
  GEN     /dev/shm/R/O-25/Makefile
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  Using /dev/shm/R/linux-2.6.25-rc3 as source for kernel
  CALL    /dev/shm/R/linux-2.6.25-rc3/scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  CALL    /dev/shm/R/linux-2.6.25-rc3/arch/powerpc/kernel/systbl_chk.sh
  CC      arch/powerpc/sysdev/fsl_soc.o
/dev/shm/R/linux-2.6.25-rc3/arch/powerpc/sysdev/fsl_soc.c:153:2: warning: #warning fixed_phy_add
/dev/shm/R/linux-2.6.25-rc3/arch/powerpc/sysdev/fsl_soc.c:153:2: warning: #warning fixed_phy_add
  LD      arch/powerpc/sysdev/built-in.o
  CC      drivers/net/phy/fixed.o
/dev/shm/R/linux-2.6.25-rc3/drivers/net/phy/fixed.c:173:2: warning: #warning fixed_phy_add
/dev/shm/R/linux-2.6.25-rc3/drivers/net/phy/fixed.c:173:2: warning: #warning fixed_phy_add
  LD      drivers/net/phy/built-in.o
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: modpost: Found 11 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/powerpc/sysdev/built-in.o: In function `of_add_fixed_phys':
(.text+0x124c): undefined reference to `fixed_phy_add'
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Target `vmlinux' not remade because of errors.
make: *** [sub-make] Error 2
make: Target `vmlinux' not remade because of errors.

real    0m15.343s
user    0m6.341s
sys     0m3.135s

olaf@lingonberry:/dev/shm/R/linux-2.6.25-rc3> quilt diff
Index: linux-2.6.25-rc3/arch/powerpc/sysdev/fsl_soc.c
===================================================================
--- linux-2.6.25-rc3.orig/arch/powerpc/sysdev/fsl_soc.c
+++ linux-2.6.25-rc3/arch/powerpc/sysdev/fsl_soc.c
@@ -150,7 +150,8 @@ EXPORT_SYMBOL(get_baudrate);
 #endif /* CONFIG_CPM2 */
 
 #ifdef CONFIG_FIXED_PHY
-static int __init of_add_fixed_phys(void)
+#warning fixed_phy_add
+/* static */ int /* __init */ of_add_fixed_phys(void)
 {
        int ret;
        struct device_node *np;
@@ -177,7 +178,9 @@ static int __init of_add_fixed_phys(void
 
        return 0;
 }
+#if 0
 arch_initcall(of_add_fixed_phys);
+#endif
 #endif /* CONFIG_FIXED_PHY */
 
 static int __init gfar_mdio_of_init(void)
Index: linux-2.6.25-rc3/drivers/net/phy/fixed.c
===================================================================
--- linux-2.6.25-rc3.orig/drivers/net/phy/fixed.c
+++ linux-2.6.25-rc3/drivers/net/phy/fixed.c
@@ -170,6 +170,7 @@ int fixed_phy_set_link_update(struct phy
 }
 EXPORT_SYMBOL_GPL(fixed_phy_set_link_update);
 
+#warning fixed_phy_add
 int fixed_phy_add(unsigned int irq, int phy_id,
                  struct fixed_phy_status *status)
 {

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

* Re: undefined reference to fixed_phy_add, from of_add_fixed_phys
  2008-02-27 10:58 undefined reference to fixed_phy_add, from of_add_fixed_phys Olaf Hering
@ 2008-02-27 11:07 ` Adrian Bunk
  2008-02-27 15:07 ` [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y Adrian Bunk
  1 sibling, 0 replies; 5+ messages in thread
From: Adrian Bunk @ 2008-02-27 11:07 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linux-kernel

On Wed, Feb 27, 2008 at 11:58:00AM +0100, Olaf Hering wrote:
> Hello,
> 
> can anyone explain why linking fails?
>...

Please always send the .config for such problems.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y
  2008-02-27 10:58 undefined reference to fixed_phy_add, from of_add_fixed_phys Olaf Hering
  2008-02-27 11:07 ` Adrian Bunk
@ 2008-02-27 15:07 ` Adrian Bunk
  2008-02-28 10:30   ` Olaf Hering
  2008-03-05 12:18   ` Jeff Garzik
  1 sibling, 2 replies; 5+ messages in thread
From: Adrian Bunk @ 2008-02-27 15:07 UTC (permalink / raw)
  To: Olaf Hering, Anton Vorontsov, Vitaly Bordug, Jeff Garzik, Kumar Gala
  Cc: linux-kernel, netdev

This patch fixes the following build error introduced by commit 
a79d8e93d300adb84cccc38ac396cfb118c238ad and reported by Olaf Hering:

<--  snip  -->

...
  LD      .tmp_vmlinux1
arch/powerpc/sysdev/built-in.o: In function `of_add_fixed_phys':
fsl_soc.c:(.init.text+0xd34): undefined reference to `fixed_phy_add'
make: *** [.tmp_vmlinux1] Error 1

<--   snip  -->

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>

---
47a94f1d74e448d39f34f0ad37f8b4f69412ee13 diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index f4ca059..3ac8529 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -67,6 +67,7 @@ config REALTEK_PHY
 
 config FIXED_PHY
 	bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
+	depends on PHYLIB=y
 	---help---
 	  Adds the platform "fixed" MDIO Bus to cover the boards that use
 	  PHYs that are not connected to the real MDIO bus.


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

* Re: [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y
  2008-02-27 15:07 ` [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y Adrian Bunk
@ 2008-02-28 10:30   ` Olaf Hering
  2008-03-05 12:18   ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Olaf Hering @ 2008-02-28 10:30 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Anton Vorontsov, Vitaly Bordug, Jeff Garzik, Kumar Gala,
	linux-kernel, netdev

On Wed, Feb 27, Adrian Bunk wrote:

> This patch fixes the following build error introduced by commit 
> a79d8e93d300adb84cccc38ac396cfb118c238ad and reported by Olaf Hering:
> 
> <--  snip  -->
> 
> ...
>   LD      .tmp_vmlinux1
> arch/powerpc/sysdev/built-in.o: In function `of_add_fixed_phys':
> fsl_soc.c:(.init.text+0xd34): undefined reference to `fixed_phy_add'
> make: *** [.tmp_vmlinux1] Error 1

Yes, this patch helps.
Thanks.


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

* Re: [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y
  2008-02-27 15:07 ` [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y Adrian Bunk
  2008-02-28 10:30   ` Olaf Hering
@ 2008-03-05 12:18   ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2008-03-05 12:18 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Olaf Hering, Anton Vorontsov, Vitaly Bordug, Kumar Gala,
	linux-kernel, netdev

Adrian Bunk wrote:
> This patch fixes the following build error introduced by commit 
> a79d8e93d300adb84cccc38ac396cfb118c238ad and reported by Olaf Hering:
> 
> <--  snip  -->
> 
> ...
>   LD      .tmp_vmlinux1
> arch/powerpc/sysdev/built-in.o: In function `of_add_fixed_phys':
> fsl_soc.c:(.init.text+0xd34): undefined reference to `fixed_phy_add'
> make: *** [.tmp_vmlinux1] Error 1
> 
> <--   snip  -->
> 
> Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>

applied (but sad)



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

end of thread, other threads:[~2008-03-05 12:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-27 10:58 undefined reference to fixed_phy_add, from of_add_fixed_phys Olaf Hering
2008-02-27 11:07 ` Adrian Bunk
2008-02-27 15:07 ` [2.6.25 patch] FIXED_PHY must depend on PHYLIB=y Adrian Bunk
2008-02-28 10:30   ` Olaf Hering
2008-03-05 12:18   ` Jeff Garzik

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