diff mbox

fec: Unify fec_ptp.c and fec.c

Message ID CAHrpEqTd2mVaTW6pwJaHqYreDo6rT_6s_o=Z=OtU71PZzZCSVg@mail.gmail.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Zhi Li March 21, 2013, 10:02 a.m. UTC
I suggest use below patch to fix this problem



2013/3/21 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hello Fabio,
>
> On Wed, Mar 20, 2013 at 05:11:07PM -0300, Fabio Estevam wrote:
>> Currently CONFIG_FEC=y generates two separate modules: fec_ptp.ko and fec.ko.
> CONFIG_FEC=m
>
>> These modules cannot be used independently, so it is better to unify them.
>>
>> Move fec_ptp.c code into fec.c and its definitions into fec.h.
>>
>> Suggested-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
> s/Koe/Kö/
>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> You could note that you dropped the EXPORT_SYMBOLs. Other than that I
> assume it's a 1:1 change?
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Uwe Kleine-König March 21, 2013, 10:09 a.m. UTC | #1
Hello,

On Thu, Mar 21, 2013 at 06:02:02PM +0800, Frank Li wrote:
> I suggest use below patch to fix this problem
> 
> --- 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_driver.o
> +fec_driver-objs := fec.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
I thought about suggesting something similar, too. I would have renamed
fec.c to (say) fec_base.c and then kept the module name fec.ko. Not sure
keeping the module name is critical.

What is missing from your patch is dropping the EXPORT_SYMBOLs. Other
than that I like it better than using a single .c file.

Best regards
Uwe
Zhi Li March 21, 2013, 10:15 a.m. UTC | #2
2013/3/21 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hello,
>
> On Thu, Mar 21, 2013 at 06:02:02PM +0800, Frank Li wrote:
>> I suggest use below patch to fix this problem
>>
>> --- 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_driver.o
>> +fec_driver-objs := fec.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
> I thought about suggesting something similar, too. I would have renamed
> fec.c to (say) fec_base.c and then kept the module name fec.ko. Not sure
> keeping the module name is critical.

Okay, how about rename fec.c to fec_main.c?

>
> What is missing from your patch is dropping the EXPORT_SYMBOLs. Other
> than that I like it better than using a single .c file.

There are not EXPORT_SYMBOL in my fec.c? which version do you use?

>
> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Uwe Kleine-König March 21, 2013, 10:31 a.m. UTC | #3
Hello Frank,

On Thu, Mar 21, 2013 at 06:15:28PM +0800, Frank Li wrote:
> 2013/3/21 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> > What is missing from your patch is dropping the EXPORT_SYMBOLs. Other
> > than that I like it better than using a single .c file.
> 
> There are not EXPORT_SYMBOL in my fec.c? which version do you use?
As David said he took Fabio's patch for stable I assume they are in
net-next. I didn't check though.

Uwe
diff mbox

Patch

--- 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_driver.o
+fec_driver-objs := fec.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