瀏覽代碼

the uncontroversal gcc 4.0 compilation fixes

tags/v0.9.3
George Baum 19 年之前
父節點
當前提交
c4c05bbbf7
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. 2
    2
      src/drivers/net/natsemi.c
  2. 2
    2
      src/drivers/net/sis900.c

+ 2
- 2
src/drivers/net/natsemi.c 查看文件

@@ -604,7 +604,7 @@ natsemi_transmit(struct nic  *nic,
604 604
 		 const char  *p)     /* Packet */
605 605
 {
606 606
     u32 to, nstype;
607
-    u32 tx_status;
607
+    volatile u32 tx_status;
608 608
     
609 609
     /* Stop the transmitter */
610 610
     outl(TxOff, ioaddr + ChipCmd);
@@ -643,7 +643,7 @@ natsemi_transmit(struct nic  *nic,
643 643
 
644 644
     to = currticks() + TX_TIMEOUT;
645 645
 
646
-    while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
646
+    while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
647 647
         /* wait */ ;
648 648
 
649 649
     if (currticks() >= to) {

+ 2
- 2
src/drivers/net/sis900.c 查看文件

@@ -1097,7 +1097,7 @@ sis900_transmit(struct nic  *nic,
1097 1097
                 const char  *p)     /* Packet */
1098 1098
 {
1099 1099
     u32 to, nstype;
1100
-    u32 tx_status;
1100
+    volatile u32 tx_status;
1101 1101
     
1102 1102
     /* Stop the transmitter */
1103 1103
     outl(TxDIS | inl(ioaddr + cr), ioaddr + cr);
@@ -1136,7 +1136,7 @@ sis900_transmit(struct nic  *nic,
1136 1136
 
1137 1137
     to = currticks() + TX_TIMEOUT;
1138 1138
 
1139
-    while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
1139
+    while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
1140 1140
         /* wait */ ;
1141 1141
 
1142 1142
     if (currticks() >= to) {

Loading…
取消
儲存