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
 		}
268
 		}
269
 
269
 
270
 		if (tq->tqi_ready_time &&
270
 		if (tq->tqi_ready_time &&
271
-		(tq->tqi_type != AR5K_TX_QUEUE_ID_CAB))
271
+		(tq->tqi_type != AR5K_TX_QUEUE_CAB))
272
 			ath5k_hw_reg_write(ah, AR5K_REG_SM(tq->tqi_ready_time,
272
 			ath5k_hw_reg_write(ah, AR5K_REG_SM(tq->tqi_ready_time,
273
 				AR5K_QCU_RDYTIMECFG_INTVAL) |
273
 				AR5K_QCU_RDYTIMECFG_INTVAL) |
274
 				AR5K_QCU_RDYTIMECFG_ENABLE,
274
 				AR5K_QCU_RDYTIMECFG_ENABLE,

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

687
 	//			rx_ring[entry].link = 0;
687
 	//			rx_ring[entry].link = 0;
688
 	rx_ring[entry].cmdsts = cpu_to_le32(CMDSTS_OWN);
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
 	if (ns->cur_rx == 0)	/* We have wrapped the ring */
692
 	if (ns->cur_rx == 0)	/* We have wrapped the ring */
693
 	  kick_rx();
693
 	  kick_rx();

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

1171
     if (rx_ring[tp->cur_rx].status & 0x00008000) {
1171
     if (rx_ring[tp->cur_rx].status & 0x00008000) {
1172
 	/* return the descriptor and buffer to receive ring */
1172
 	/* return the descriptor and buffer to receive ring */
1173
         rx_ring[tp->cur_rx].status = 0x80000000;
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
         return 0;
1175
         return 0;
1176
     }
1176
     }
1177
 
1177
 
1180
 
1180
 
1181
     /* return the descriptor and buffer to receive ring */
1181
     /* return the descriptor and buffer to receive ring */
1182
     rx_ring[tp->cur_rx].status = 0x80000000;
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
     return 1;
1185
     return 1;
1186
 }
1186
 }

Loading…
Cancel
Save