2000-11-22 15:30:40

by Andrey Panin

[permalink] [raw]
Subject: [PATCH] net drivers cleanup


Hi Jeff,

attached new network drivers cleanup patchset:
shaper.c, ac3200.c, e2100.c, lne390.c, ne3210.c, es3210.c, ioc3-eth.c,
ni5010.c, ni52.c, hp.c, hp-plus.c, eth16i.c, 3c503.c, 3c505.c, 3c507.c,
cs89x0.c, wd.c.

Modifications: request_(irq|region) cleanup, printk() cleanup, named initializers,
some labels (like out & out1 :) got more descriptive names.

All patches are against 2.4.0-test11, because i can't use your CVS for 2 reasons:
lack of password and slow internet connection (checkout linux kernel via 33.6 kbps
leased line will be very looooooong process :)

Unfortunately I have to make a business trip (new satellite launch mission)
so, it's most probably my last patchset for a some weeks at least.

Best regards,
Andrey
--
Andrey Panin | Embedded systems software engineer
[email protected] | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc


Attachments:
patch-shaper (3.72 kB)
patch-ac3200 (1.92 kB)
patch-e2100 (1.80 kB)
patch-lne390 (3.83 kB)
patch-ne3210 (4.16 kB)
patch-es3210 (4.25 kB)
patch-ioc3-eth (617.00 B)
patch-ni5010 (4.45 kB)
patch-ni52 (2.70 kB)
pathc-hp (1.84 kB)
patch-hp-plus (2.18 kB)
patch-eth16i (1.34 kB)
patch-3c503 (5.06 kB)
patch-3c505 (20.06 kB)
patch-3c507 (7.43 kB)
patch-cs89x0 (8.95 kB)
patch-wd (1.94 kB)
(No filename) (232.00 B)
Download all attachments
Subject: Re: [PATCH] net drivers cleanup


Hi

patch-3c503:
@@ -307,11 +307,12 @@
{
ei_status.tx_start_page = EL2_MB1_START_PG;
ei_status.rx_start_page = EL2_MB1_START_PG + TX_PAGES;
- printk("\n%s: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n",
- dev->name, ei_status.name, (wordlength+1)<<3);
+ printk( KERN_ERR "\n%s: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n",
--> ^^ superfluous
+ dev->name, ei_status.name, (wordlength+1)<<3);

Either remove this '\n' or change to ("\n" KERN_ERR "%s...\n").


patch-3c507:
@@ -323,8 +323,8 @@

static int __init el16_probe1(struct net_device *dev, int ioaddr)
{
- static unsigned char init_ID_done = 0, version_printed = 0;
- int i, irq, irqval, retval;
+ static unsigned char init_ID_done, version_printed;
+ int i, irq, retval;

This is wrong because later we depend on assumption that
these values are equal to 0 (they aren't autoinitialized to 0).


patch-lne390:
@@ -121,14 +121,14 @@

if (!EISA_bus) {
#if LNE390_DEBUG & LNE390_D_PROBE
- printk("lne390-debug: Not an EISA bus. Not probing high ports.\n");
+ printk(kern_debug "lne390-debug: Not an EISA bus. Not probing high ports.\n");
^^^^^^^^^^ should be KERN_DEBUG of course ;)


patch-wd:
@@ -124,7 +124,7 @@
int ancient = 0; /* An old card without config registers. */
int word16 = 0; /* 0 = 8 bit, 1 = 16 bit */
const char *model_name;
- static unsigned version_printed = 0;
+ static unsigned version_printed;

This is wrong because later we depend on assumption that
version_printed is equal to 0 (it isn't autoinitialized to 0).


Regards
--
Bartlomiej Zolnierkiewicz
<[email protected]>

2000-11-23 23:05:54

by Alan

[permalink] [raw]
Subject: Re: [PATCH] net drivers cleanup

> - static unsigned char init_ID_done = 0, version_printed = 0;
> - int i, irq, irqval, retval;
> + static unsigned char init_ID_done, version_printed;
> + int i, irq, retval;
>
> This is wrong because later we depend on assumption that
> these values are equal to 0 (they aren't autoinitialized to 0).

static starts at zero - its defined