Browse Source

[drivers] Fix warnings identified by gcc 4.5

In building gpxe for openSUSE Factory (part of kvm package), there were
a few problems identified by the compiler.  This patch addresses them.

Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
tags/v1.20.1
Bruce Rogers 14 years ago
parent
commit
f7c5918b17
3 changed files with 4 additions and 4 deletions
  1. 1
    1
      src/drivers/net/ath5k/ath5k_qcu.c
  2. 1
    1
      src/drivers/net/ns83820.c
  3. 2
    2
      src/drivers/net/tulip.c

+ 1
- 1
src/drivers/net/ath5k/ath5k_qcu.c View File

@@ -268,7 +268,7 @@ int ath5k_hw_reset_tx_queue(struct ath5k_hw *ah)
268 268
 		}
269 269
 
270 270
 		if (tq->tqi_ready_time &&
271
-		(tq->tqi_type != AR5K_TX_QUEUE_ID_CAB))
271
+		(tq->tqi_type != AR5K_TX_QUEUE_CAB))
272 272
 			ath5k_hw_reg_write(ah, AR5K_REG_SM(tq->tqi_ready_time,
273 273
 				AR5K_QCU_RDYTIMECFG_INTVAL) |
274 274
 				AR5K_QCU_RDYTIMECFG_ENABLE,

+ 1
- 1
src/drivers/net/ns83820.c View File

@@ -687,7 +687,7 @@ static int ns83820_poll(struct nic *nic, int retrieve)
687 687
 	//			rx_ring[entry].link = 0;
688 688
 	rx_ring[entry].cmdsts = cpu_to_le32(CMDSTS_OWN);
689 689
 
690
-	ns->cur_rx = ++ns->cur_rx % NR_RX_DESC;
690
+	ns->cur_rx = (ns->cur_rx + 1) % NR_RX_DESC;
691 691
 
692 692
 	if (ns->cur_rx == 0)	/* We have wrapped the ring */
693 693
 	  kick_rx();

+ 2
- 2
src/drivers/net/tulip.c View File

@@ -1171,7 +1171,7 @@ static int tulip_poll(struct nic *nic, int retrieve)
1171 1171
     if (rx_ring[tp->cur_rx].status & 0x00008000) {
1172 1172
 	/* return the descriptor and buffer to receive ring */
1173 1173
         rx_ring[tp->cur_rx].status = 0x80000000;
1174
-	tp->cur_rx = (++tp->cur_rx) % RX_RING_SIZE;
1174
+	tp->cur_rx = (tp->cur_rx + 1) % RX_RING_SIZE;
1175 1175
         return 0;
1176 1176
     }
1177 1177
 
@@ -1180,7 +1180,7 @@ static int tulip_poll(struct nic *nic, int retrieve)
1180 1180
 
1181 1181
     /* return the descriptor and buffer to receive ring */
1182 1182
     rx_ring[tp->cur_rx].status = 0x80000000;
1183
-    tp->cur_rx = (++tp->cur_rx) % RX_RING_SIZE;
1183
+    tp->cur_rx = (tp->cur_rx + 1) % RX_RING_SIZE;
1184 1184
 
1185 1185
     return 1;
1186 1186
 }

Loading…
Cancel
Save