diff mbox series

[RFC,2/2] net-next: xsurf100: drop include of lib8390.c

Message ID 1528523869-3403-3-git-send-email-schmitzmic@gmail.com
State RFC, archived
Delegated to: David Miller
Headers show
Series net-next: cleanup use of lib8390.c code in xsurf100.c | expand

Commit Message

Michael Schmitz June 9, 2018, 5:57 a.m. UTC
Now that ax88796.c exports the ax_NS8390_init() symbol, we can
include 8390.h instead of lib8390.c, avoiding duplication of that
function and killing a few compile warnings in the bargain.

Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
---
 drivers/net/ethernet/8390/xsurf100.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

Comments

Geert Uytterhoeven June 9, 2018, 2:33 p.m. UTC | #1
Hi Michael,

On Sat, Jun 9, 2018 at 7:58 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
>
> Now that ax88796.c exports the ax_NS8390_init() symbol, we can
> include 8390.h instead of lib8390.c, avoiding duplication of that
> function and killing a few compile warnings in the bargain.
>
> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>

Thanks for your patch!


> --- a/drivers/net/ethernet/8390/xsurf100.c
> +++ b/drivers/net/ethernet/8390/xsurf100.c
> @@ -33,8 +33,6 @@
>  #define HW_CHIPID              0x70
>  #define HW_SCRATCH             0x78
>
> -#define __NS8390_init ax_NS8390_init
> -
>  /* force unsigned long back to 'void __iomem *' */
>  #define ax_convert_addr(_a) ((void __force __iomem *)(_a))
>
> @@ -80,12 +78,10 @@ static void reg_write16(void __iomem *base, u16 reg, u16 val)

This doesn't apply against net-next, which doesn't have reg_write16() (yet?).

Apart from that, your patch looks fine to me.

Gr{oetje,eeting}s,

                        Geert
Michael Schmitz June 9, 2018, 7 p.m. UTC | #2
Hi Geert,

Am 10.06.2018 um 02:33 schrieb Geert Uytterhoeven:
> Hi Michael,
>
> On Sat, Jun 9, 2018 at 7:58 AM Michael Schmitz <schmitzmic@gmail.com> wrote:
>>
>> Now that ax88796.c exports the ax_NS8390_init() symbol, we can
>> include 8390.h instead of lib8390.c, avoiding duplication of that
>> function and killing a few compile warnings in the bargain.
>>
>> Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
>
> Thanks for your patch!
>
>
>> --- a/drivers/net/ethernet/8390/xsurf100.c
>> +++ b/drivers/net/ethernet/8390/xsurf100.c
>> @@ -33,8 +33,6 @@
>>  #define HW_CHIPID              0x70
>>  #define HW_SCRATCH             0x78
>>
>> -#define __NS8390_init ax_NS8390_init
>> -
>>  /* force unsigned long back to 'void __iomem *' */
>>  #define ax_convert_addr(_a) ((void __force __iomem *)(_a))
>>
>> @@ -80,12 +78,10 @@ static void reg_write16(void __iomem *base, u16 reg, u16 val)
>
> This doesn't apply against net-next, which doesn't have reg_write16() (yet?).

Bummer - that's from my experimental ISP1173 probe code, nothing to do 
with network code.

I'll redo these patches against net-next (and add a non-static wrapper 
for ax_NS8390_init to allow compiling in the driver).

Thanks,

	Michael

> Apart from that, your patch looks fine to me.
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/8390/xsurf100.c b/drivers/net/ethernet/8390/xsurf100.c
index 4c6f9cb..32caa5e 100644
--- a/drivers/net/ethernet/8390/xsurf100.c
+++ b/drivers/net/ethernet/8390/xsurf100.c
@@ -33,8 +33,6 @@ 
 #define HW_CHIPID		0x70
 #define HW_SCRATCH		0x78
 
-#define __NS8390_init ax_NS8390_init
-
 /* force unsigned long back to 'void __iomem *' */
 #define ax_convert_addr(_a) ((void __force __iomem *)(_a))
 
@@ -80,12 +78,10 @@  static void reg_write16(void __iomem *base, u16 reg, u16 val)
 	writew(val, base + reg*4);
 }
 
+#define NS8390_CORE
+#include "8390.h"
 
-
-static unsigned char version[] =
-		"ax88796.c: Copyright 2005,2007 Simtec Electronics\n";
-
-#include "lib8390.c"
+extern void ax_NS8390_init(struct net_device *dev, int startp);
 
 /* from ne.c */
 #define NE_CMD		EI_SHIFT(0x00)