Skip to contentSkip to conversation

bcm43xx-mac80211: Remove the stackdump in rfatt/bbatt assertion

PATCH In review Michael Buesch 2 participants 2 messages Aug 7, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm43xx-mac80211: Remove the stackdump in rfatt/bbatt assertion

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

drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c +7 -12
Index: wireless-dev/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_lo.c
===================================================================
@@ -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;
 }
Signature · 1 line
Greetings Michael.