Patchwork [1/1,v2,net-next] net: fec: fix the build as module

login
register
mail settings
Submitter Frank Li
Date March 22, 2013, 1:19 a.m.
Message ID <1363915193-22179-1-git-send-email-Frank.Li@freescale.com>
Download mbox | patch
Permalink /patch/229872/
State New
Headers show

Comments

Frank Li - March 22, 2013, 1:19 a.m.
Since commit ff43da86c69 (NET: FEC: dynamtic check DMA desc buff type) the
following build error happens when CONFIG_FEC=m

ERROR: "fec_ptp_init" [drivers/net/ethernet/freescale/fec.ko] undefined!
ERROR: "fec_ptp_ioctl" [drivers/net/ethernet/freescale/fec.ko] undefined!
ERROR: "fec_ptp_start_cyclecounter" [drivers/net/ethernet/freescale/fec.ko] undefined!

rename fec.c to fec_main.c
Build fec.o and fec_ptp.o into one fec.ko

Reported-by: Uwe Kleine-K├Ânig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
---
Change from V1 to V2
1. Use -M option to create patch

 drivers/net/ethernet/freescale/Makefile            |    3 ++-
 .../net/ethernet/freescale/{fec.c => fec_main.c}   |    0
 2 files changed, 2 insertions(+), 1 deletions(-)
 rename drivers/net/ethernet/freescale/{fec.c => fec_main.c} (100%)

diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec_main.c
similarity index 100%
rename from drivers/net/ethernet/freescale/fec.c
rename to drivers/net/ethernet/freescale/fec_main.c
Fabio Estevam - March 22, 2013, 2:36 a.m.
On Thu, Mar 21, 2013 at 10:19 PM, Frank Li <Frank.Li@freescale.com> wrote:
> Since commit ff43da86c69 (NET: FEC: dynamtic check DMA desc buff type) the
> following build error happens when CONFIG_FEC=m
>
> ERROR: "fec_ptp_init" [drivers/net/ethernet/freescale/fec.ko] undefined!
> ERROR: "fec_ptp_ioctl" [drivers/net/ethernet/freescale/fec.ko] undefined!
> ERROR: "fec_ptp_start_cyclecounter" [drivers/net/ethernet/freescale/fec.ko] undefined!

This error does not not happen in 'net-next' anymore.
Frank Li - March 22, 2013, 2:39 a.m.
>
> This error does not not happen in 'net-next' anymore.

what's your suggestion? change commit message or request apply to 3.9

best regards
Frank Li
Fabio Estevam - March 23, 2013, 6:12 p.m.
On Thu, Mar 21, 2013 at 11:39 PM, Frank Li <lznuaa@gmail.com> wrote:
>>
>> This error does not not happen in 'net-next' anymore.
>
> what's your suggestion? change commit message or request apply to 3.9

Your motivation now is to generate a single kernel module instead of
two for the fec, rather than fixing the the build error.

So you need to adjust the Subject and commit log.

I am not sure if we really need to rename fec.c though.

Patch

diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile
index b7d58fe..549ce13 100644
--- a/drivers/net/ethernet/freescale/Makefile
+++ b/drivers/net/ethernet/freescale/Makefile
@@ -2,7 +2,8 @@ 
 # Makefile for the Freescale network device drivers.
 #
 
-obj-$(CONFIG_FEC) += fec.o fec_ptp.o
+obj-$(CONFIG_FEC) += fec.o
+fec-objs :=fec_main.o fec_ptp.o
 obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx.o
 ifeq ($(CONFIG_FEC_MPC52xx_MDIO),y)
 	obj-$(CONFIG_FEC_MPC52xx) += fec_mpc52xx_phy.o