2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00

b43: Fix warnings from gcc 4.6.0

gcc 4.6.0 warnings for b43:

  CC [M]  drivers/net/wireless/b43/lo.o
drivers/net/wireless/b43/lo.c: In function ‘lo_measure_gain_values’:
drivers/net/wireless/b43/lo.c:304:7: warning: variable ‘trsw_rx’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/b43/dma.o
drivers/net/wireless/b43/dma.c: In function ‘free_all_descbuffers’:
drivers/net/wireless/b43/dma.c:760:30: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/b43/dma.c: In function ‘b43_dma_handle_txstatus’:
drivers/net/wireless/b43/dma.c:1391:30: warning: variable ‘desc’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Larry Finger 2011-05-22 20:54:25 -05:00 committed by John W. Linville
parent 24f7580e85
commit 9c1cacd2c0
2 changed files with 4 additions and 6 deletions

View File

@ -757,14 +757,14 @@ static void dmacontroller_cleanup(struct b43_dmaring *ring)
static void free_all_descbuffers(struct b43_dmaring *ring) static void free_all_descbuffers(struct b43_dmaring *ring)
{ {
struct b43_dmadesc_generic *desc;
struct b43_dmadesc_meta *meta; struct b43_dmadesc_meta *meta;
int i; int i;
if (!ring->used_slots) if (!ring->used_slots)
return; return;
for (i = 0; i < ring->nr_slots; i++) { for (i = 0; i < ring->nr_slots; i++) {
desc = ring->ops->idx2desc(ring, i, &meta); /* get meta - ignore returned value */
ring->ops->idx2desc(ring, i, &meta);
if (!meta->skb || b43_dma_ptr_is_poisoned(meta->skb)) { if (!meta->skb || b43_dma_ptr_is_poisoned(meta->skb)) {
B43_WARN_ON(!ring->tx); B43_WARN_ON(!ring->tx);
@ -1388,7 +1388,6 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
{ {
const struct b43_dma_ops *ops; const struct b43_dma_ops *ops;
struct b43_dmaring *ring; struct b43_dmaring *ring;
struct b43_dmadesc_generic *desc;
struct b43_dmadesc_meta *meta; struct b43_dmadesc_meta *meta;
int slot, firstused; int slot, firstused;
bool frame_succeed; bool frame_succeed;
@ -1416,7 +1415,8 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
ops = ring->ops; ops = ring->ops;
while (1) { while (1) {
B43_WARN_ON(slot < 0 || slot >= ring->nr_slots); B43_WARN_ON(slot < 0 || slot >= ring->nr_slots);
desc = ops->idx2desc(ring, slot, &meta); /* get meta - ignore returned value */
ops->idx2desc(ring, slot, &meta);
if (b43_dma_ptr_is_poisoned(meta->skb)) { if (b43_dma_ptr_is_poisoned(meta->skb)) {
b43dbg(dev->wl, "Poisoned TX slot %d (first=%d) " b43dbg(dev->wl, "Poisoned TX slot %d (first=%d) "

View File

@ -301,14 +301,12 @@ static void lo_measure_gain_values(struct b43_wldev *dev,
max_rx_gain = 0; max_rx_gain = 0;
if (has_loopback_gain(phy)) { if (has_loopback_gain(phy)) {
int trsw_rx = 0;
int trsw_rx_gain; int trsw_rx_gain;
if (use_trsw_rx) { if (use_trsw_rx) {
trsw_rx_gain = gphy->trsw_rx_gain / 2; trsw_rx_gain = gphy->trsw_rx_gain / 2;
if (max_rx_gain >= trsw_rx_gain) { if (max_rx_gain >= trsw_rx_gain) {
trsw_rx_gain = max_rx_gain - trsw_rx_gain; trsw_rx_gain = max_rx_gain - trsw_rx_gain;
trsw_rx = 0x20;
} }
} else } else
trsw_rx_gain = max_rx_gain; trsw_rx_gain = max_rx_gain;