netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@nokia.com>
To: dsilvers@simtec.co.uk
Cc: netdev@vger.kernel.org
Subject: Re: [Patch] Micrel KS8695 intergrated ethernet driver
Date: Sat, 13 Dec 2008 21:07:25 +0200	[thread overview]
Message-ID: <8763lnnbbm.fsf@nokia.com> (raw)
In-Reply-To: <1228734318.19000.84.camel@petitemort> (ext Daniel Silverstone's message of "Mon\, 08 Dec 2008 11\:05\:18 +0000")

Daniel Silverstone <dsilvers@simtec.co.uk> writes:

>> > +       if (ksp->tx_buffers[buff_n].skb) {
>> > +               /* This slot is used, try later */
>> > +               spin_unlock_irq(&ksp->txq_lock);
>> > +               return -EAGAIN;
>> Since you already tested tx_ring_used, wouldn't this indicate a bug?
>
> Yep, this was old code before I kept a track in tx_ring_used. Changed
> to:
>
> BUG_ON(ksp->tx_buffers[buff_n].skb);

I would say that a network driver should never use BUG_ON(), it just
makes both user's and developer's life difficult because the whole
kernel will stop the execution. WARN_ON() is much nicer, it just
prints a nice warning to the log which then can be reported either
manually or automatically.

-- 
Kalle Valo

  parent reply	other threads:[~2008-12-13 19:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-05 15:06 [Patch] Micrel KS8695 intergrated ethernet driver Daniel Silverstone
2008-12-05 17:57 ` Ben Hutchings
2008-12-08 11:05   ` Daniel Silverstone
2008-12-08 15:17     ` Ben Hutchings
2008-12-08 20:29       ` David Miller
2008-12-09  8:57     ` Christoph Hellwig
2008-12-09  9:05       ` David Miller
2008-12-09  9:29         ` Daniel Silverstone
2008-12-13 19:07     ` Kalle Valo [this message]
2008-12-08 13:08   ` Daniel Silverstone
2008-12-09 17:00     ` Daniel Silverstone
     [not found]     ` <1228764912.3177.39.camel@achroite>
2008-12-09 17:30       ` [Patch] Micrel KS8695 integrated " Daniel Silverstone
2008-12-09 18:10         ` Ben Hutchings
2008-12-10  7:05         ` David Miller
2008-12-10 15:41           ` Daniel Silverstone
2008-12-12  5:01             ` David Miller

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=8763lnnbbm.fsf@nokia.com \
    --to=kalle.valo@nokia.com \
    --cc=dsilvers@simtec.co.uk \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).