Subject: [PATCH] eepro 0.13a

these changes was sent by Michael Westermann.

changelog:

* in memory shortage, drop the packet also in board
* remove KERN_ macros in printk calls that doesn't start a new line

--
aris


Attachments:
(No filename) (189.00 B)
eepro-2.2-0.13a.diff (2.36 kB)
eepro-2.4-0.13a.diff (2.38 kB)
eepro-2.5-0.13a.diff (2.38 kB)
Download all attachments

2002-07-30 13:31:54

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] eepro 0.13a


> @@ -633,37 +633,37 @@
>
> i = inb(dev->base_addr + ID_REG);
> printk(KERN_DEBUG " id: %#x ",i);
> - printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
> + printk(" io: %#x ", (unsigned)dev->base_addr);
>
> switch (lp->eepro) {
> case LAN595FX_10ISA:
> - printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
> + printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
> dev->name, (unsigned)dev->base_addr);

[more cases deleted]

This surely can't be right. Why are you dropping all the KERN_*s ?

-Andi

Subject: Re: [PATCH] eepro 0.13a

> > @@ -633,37 +633,37 @@
> >
> > i = inb(dev->base_addr + ID_REG);
> > printk(KERN_DEBUG " id: %#x ",i);
> > - printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
> > + printk(" io: %#x ", (unsigned)dev->base_addr);
> >
> > switch (lp->eepro) {
> > case LAN595FX_10ISA:
> > - printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
> > + printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
> > dev->name, (unsigned)dev->base_addr);
>
> [more cases deleted]
>
> This surely can't be right. Why are you dropping all the KERN_*s ?
printk that doesn't start a new line had KERN_* removed because it prints in
the middle of line KERN_* macros like
id: 0xb4 <7> io: 0x340 <6>eth0: Intel EtherExpress Pro/10+ ISA
i had the same reaction but Michael pointed this to me. i don't know exactly
how this macro works, but you'll have the line printed out with the
beggining using KERN_* macro. isn't that sufficient?

--
aris

2002-07-30 14:11:05

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] eepro 0.13a

> printk that doesn't start a new line had KERN_* removed because it prints in
> the middle of line KERN_* macros like
> id: 0xb4 <7> io: 0x340 <6>eth0: Intel EtherExpress Pro/10+ ISA
> i had the same reaction but Michael pointed this to me. i don't know exactly
> how this macro works, but you'll have the line printed out with the

The macro just prepends a sting using ISO C string concatenation.
> beggining using KERN_* macro. isn't that sufficient?

That makes sense. Thanks,

-Andi

2002-07-30 14:01:10

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] eepro 0.13a

Andi Kleen wrote:
>>@@ -633,37 +633,37 @@
>>
>> i = inb(dev->base_addr + ID_REG);
>> printk(KERN_DEBUG " id: %#x ",i);
>>- printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
>>+ printk(" io: %#x ", (unsigned)dev->base_addr);
>>
>> switch (lp->eepro) {
>> case LAN595FX_10ISA:
>>- printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
>>+ printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
>> dev->name, (unsigned)dev->base_addr);
>
>
> [more cases deleted]
>
> This surely can't be right. Why are you dropping all the KERN_*s ?


I have a feeling he ran a diff between his "pure" copy and the kernel
copy, and assumed the output was correct....

Jeff




2002-07-30 13:52:45

by Andreas Schwab

[permalink] [raw]
Subject: Re: [PATCH] eepro 0.13a

Andi Kleen <[email protected]> writes:

|> > @@ -633,37 +633,37 @@
|> >
|> > i = inb(dev->base_addr + ID_REG);
|> > printk(KERN_DEBUG " id: %#x ",i);
|> > - printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
|> > + printk(" io: %#x ", (unsigned)dev->base_addr);
|> >
|> > switch (lp->eepro) {
|> > case LAN595FX_10ISA:
|> > - printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
|> > + printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
|> > dev->name, (unsigned)dev->base_addr);
|>
|> [more cases deleted]
|>
|> This surely can't be right. Why are you dropping all the KERN_*s ?

Because the previous output is not terminated by a newline, and KERN_*s
are only recognized after newline, not in the middle of a line.

Andreas.

--
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N?rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."