All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA devel <alsa-devel@alsa-project.org>
Subject: snd_assert() removal
Date: Wed, 13 Aug 2008 12:16:33 +0200	[thread overview]
Message-ID: <48A2B481.9060808@keyaccess.nl> (raw)

Hi Takashi.

Just see the snd_assert() removal. Much better as far as I'm concerned 
but just as a remark -- there's many combined ones of the form:

diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c
index 33e9cf1..6a85fdc 100644
--- a/sound/isa/cs423x/cs4236_lib.c
+++ b/sound/isa/cs423x/cs4236_lib.c
@@ -967,7 +967,8 @@ int snd_cs4236_mixer(struct snd_wss *chip)
         int err;
         struct snd_kcontrol_new *kcontrol;

-       snd_assert(chip != NULL && chip->card != NULL, return -EINVAL);
+       if (snd_BUG_ON(!chip || !chip->card))
+               return -EINVAL;
         card = chip->card;
         strcpy(card->mixername, snd_wss_chip_id(chip));

in there. Just thought I'd point that Andrew Morton has been pushing 
back on multiple conditions per regular BUG_ON()/WARN_ON() lately as 
they end up giving less useful information then split ones ("so what 
triggered?").

Just a remark as said but if you agree with him, maybe now is the best 
time to split them directly as well.

Rene.

             reply	other threads:[~2008-08-13 10:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13 10:16 Rene Herman [this message]
2008-08-13 12:56 ` snd_assert() removal Takashi Iwai

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=48A2B481.9060808@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.