Search Linux Wireless

[PATCH] b43: Fix phy_g.c compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix compile warning for non-debug builds:

drivers/net/wireless/b43/phy_g.c: In function ‘b43_gphy_op_recalc_txpower’:
drivers/net/wireless/b43/phy_g.c:3195: warning: unused variable ‘dbm’

Signed-off-by: Michael Buesch <mb@xxxxxxxxx>

---

Index: wireless-testing/drivers/net/wireless/b43/phy_g.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/phy_g.c	2009-01-23 19:18:42.000000000 +0100
+++ wireless-testing/drivers/net/wireless/b43/phy_g.c	2009-01-24 22:33:44.000000000 +0100
@@ -3188,20 +3188,23 @@ static enum b43_txpwr_result b43_gphy_op
 	/* Lower attenuation => Bigger power output. Negate it. */
 	bbatt_delta = -bbatt_delta;
 	/* RF att affects power level 4 times as much as
 	 * Baseband attennuation. Subtract it. */
 	bbatt_delta -= 4 * rfatt_delta;
 
+#if B43_DEBUG
 	if (b43_debug(dev, B43_DBG_XMITPOWER)) {
 		int dbm = pwr_adjust < 0 ? -pwr_adjust : pwr_adjust;
 		b43dbg(dev->wl,
 		       "[TX power deltas]  %s" Q52_FMT " dBm   =>   "
 		       "bbatt-delta = %d,  rfatt-delta = %d\n",
 		       (pwr_adjust < 0 ? "-" : ""), Q52_ARG(dbm),
 		       bbatt_delta, rfatt_delta);
 	}
+#endif /* DEBUG */
+
 	/* So do we finally need to adjust something in hardware? */
 	if ((rfatt_delta == 0) && (bbatt_delta == 0))
 		goto no_adjustment_needed;
 
 	/* Save the deltas for later when we adjust the power. */
 	gphy->bbatt_delta = bbatt_delta;


-- 
Greetings, Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux