All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Pavel Roskin <proski@gnu.org>,
	Larry Finger <larry.finger@lwfinger.net>,
	bcm43xx-dev@lists.berlios.de
Subject: [PATCH] bcm43xx-mac80211: Remove the stackdump in rfatt/bbatt assertion
Date: Tue, 7 Aug 2007 18:15:09 +0200	[thread overview]
Message-ID: <200708071815.09936.mb@bu3sch.de> (raw)

This removes the stackdump in the rfatt/bbatt assertion
to reduce verbosity, but it also increases the message log
level from "debug" to "error".

Signed-off-by: Michael Buesch <mb@bu3sch.de>


Index: wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c	2007-08-07 17:57:52.000000000 +0200
+++ wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c	2007-08-07 18:11:04.000000000 +0200
@@ -62,28 +62,23 @@ static void bcm43xx_lo_write(struct bcm4
 	bcm43xx_phy_write(dev, reg, value);
 }
 
-static inline
-int assert_rfatt_and_bbatt(const struct bcm43xx_rfatt *rfatt,
-			   const struct bcm43xx_bbatt *bbatt,
-			   struct bcm43xx_wldev *dev)
+static int assert_rfatt_and_bbatt(const struct bcm43xx_rfatt *rfatt,
+				  const struct bcm43xx_bbatt *bbatt,
+				  struct bcm43xx_wldev *dev)
 {
 	int err = 0;
 
 	/* Check the attenuation values against the LO control array sizes. */
-#if BCM43xx_DEBUG
-	if (rfatt->att >= BCM43xx_NR_RF) {
-		bcmdbg(dev->wl, "rfatt(%u) >= size of LO array\n",
+	if (unlikely(rfatt->att >= BCM43xx_NR_RF)) {
+		bcmerr(dev->wl, "rfatt(%u) >= size of LO array\n",
 		       rfatt->att);
 		err = -EINVAL;
 	}
-	if (bbatt->att >= BCM43xx_NR_BB) {
-		bcmdbg(dev->wl, "bbatt(%u) >= size of LO array\n",
+	if (unlikely(bbatt->att >= BCM43xx_NR_BB)) {
+		bcmerr(dev->wl, "bbatt(%u) >= size of LO array\n",
 		       bbatt->att);
 		err = -EINVAL;
 	}
-	if (err)
-		dump_stack();
-#endif /* BCM43xx_DEBUG */
 
 	return err;
 }

-- 
Greetings Michael.

             reply	other threads:[~2007-08-07 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 16:15 Michael Buesch [this message]
2007-08-07 18:01 ` [PATCH] bcm43xx-mac80211: Remove the stackdump in rfatt/bbatt assertion Larry Finger

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=200708071815.09936.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=larry.finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=proski@gnu.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 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.