public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"Andrew V. Savochkin" <saw@saw.sw.com.sg>,
	cgl_discussion mailing list <cgl_discussion@osdl.org>,
	evlog mailing list <evlog-developers@lists.sourceforge.net>,
	"ipslinux (Keith Mitchell)" <ipslinux@us.ibm.com>,
	Linus Torvalds <torvalds@home.transmeta.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Hien Nguyen <hien@us.ibm.com>,
	James Keniston <kenistoj@us.ibm.com>,
	Mike Sullivan <sullivam@us.ibm.com>
Subject: Re: [PATCH-RFC] README 1ST - New problem logging macros (2.5.38)
Date: Tue, 24 Sep 2002 15:55:42 +1000	[thread overview]
Message-ID: <20020924055657.C968F2C0A6@lists.samba.org> (raw)
In-Reply-To: Your message of "Mon, 23 Sep 2002 22:40:41 -0400." <3D8FD0A9.1010906@pobox.com>

In message <3D8FD0A9.1010906@pobox.com> you write:
> > @@ -325,7 +326,8 @@
> >  	while(inb(cmd_ioaddr) && --wait >= 0);
> >  #ifndef final_version
> >  	if (wait < 0)
> > -		printk(KERN_ALERT "eepro100: wait_for_cmd_done timeout!\n");
> > +		problem(LOG_ALERT, "eepro100: wait_for_cmd_done timeout!",
> > +				detail(ioaddr, "%lx", cmd_ioaddr));
> 
> bloat, the ioaddr can easily be deduced

No!  That's *exactly* the problem: you see:
	eepro100: wait_for_cmd_done timeout!

in your logs, now *which* of the 5 eepro100 cards was it?

wait_for_cmd_done(long cmd_ioaddr) should take a 'struct net_device *'
and use net_problem, then no details needed.

> > +	pci_introduce(pdev);
> 
> bloat, we don't need foo_introduce() functions for every subsystem, when 
> every subsystem always has an attach-new-device function.

Yes, this should be moved up into the generic pci/networking code, but I
guess they wanted a self-contained example.

> > -		printk (KERN_ERR "eepro100: cannot reserve MMIO region\n");
> > +		pci_problem(LOG_ERR, pdev, "eepro100: cannot reserve MMIO regio
n");
> 
> bloat, no advantage over printk

Now, which of those 5 cards was it again?

> > -			printk(KERN_WARNING "%s: Invalid EEPROM checksum %#4.4x
, "
> > -				   "check settings before activating this devic
e!\n",
> > -				   dev->name, sum);
> > +			net_pci_problem(LOG_WARNING, dev, pdev, "Invalid EEPROM
 checksum, "
> > +				   "check settings before activating this devic
e!",
> 
> > +				   detail(checksum, "%#4.4x", sum));
> 
> bloat, checksum is purely informational, and can be obtained through 
> other means

It's a direct translation from the printk ferchissakes!

> likewise
> 
> etcetera...

Exactly.

Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2002-09-24  5:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24  1:55 [PATCH-RFC] README 1ST - New problem logging macros (2.5.38) Larry Kessler
2002-09-24  2:40 ` Jeff Garzik
2002-09-24  5:55   ` Rusty Russell [this message]
2002-09-24  6:11     ` Jeff Garzik
2002-09-24  6:58       ` Rusty Russell
2002-09-24  5:15 ` Greg KH
2002-09-24  5:28   ` Jeff Garzik
2002-09-26 18:56   ` Larry Kessler
2002-09-26 19:38     ` Rik van Riel
2002-09-26 20:01       ` Larry Kessler
2002-09-26 18:41         ` Rob Landley
2002-09-24  5:58 ` Greg KH
2002-09-24 16:32   ` Patrick Mochel
2002-09-24  8:36 ` Andrey Savochkin
  -- strict thread matches above, loose matches on Subject: below --
2002-09-24  4:49 [PATCH-RFC] " Larry Kessler
2002-09-24 12:58 ` Denis Vlasenko
2002-09-24 13:59   ` Gerhard Mack
2002-09-24 22:38     ` Thunder from the hill
2002-09-24  4:56 Jeff Garzik
2002-09-24 14:04 Randal, Phil
2002-09-24 14:15 ` Sven Koch
2002-09-26 15:43 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020924055657.C968F2C0A6@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cgl_discussion@osdl.org \
    --cc=evlog-developers@lists.sourceforge.net \
    --cc=hien@us.ibm.com \
    --cc=ipslinux@us.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=kenistoj@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saw@saw.sw.com.sg \
    --cc=sullivam@us.ibm.com \
    --cc=torvalds@home.transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox