aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-07-17 05:39:58 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-17 16:23:19 -0400
commita6343afb6e16b65b9f0b264f94f8207212e7e3ae (patch)
tree038520431715be0dab295883ba994b7854202c71 /drivers/net
parentb1734d2388cc45ecdec58615e35955d0d402f938 (diff)
drivers/*: mark variables with uninitialized_var()
Mark variables in drivers/* with uninitialized_var() if such a warning appears, and analysis proves that the var is initialized properly on all paths it is used. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/tokenring/smctr.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 982a9010c7a9..bb6896ae3151 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2338,7 +2338,7 @@ static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb,
2338{ 2338{
2339 struct skb_shared_info *info = skb_shinfo(skb); 2339 struct skb_shared_info *info = skb_shinfo(skb);
2340 unsigned int cur_frag, entry; 2340 unsigned int cur_frag, entry;
2341 struct TxDesc *txd; 2341 struct TxDesc * uninitialized_var(txd);
2342 2342
2343 entry = tp->cur_tx; 2343 entry = tp->cur_tx;
2344 for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) { 2344 for (cur_frag = 0; cur_frag < info->nr_frags; cur_frag++) {
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 58d7e5d452fa..f83bb5cb0d3d 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -3692,7 +3692,6 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
3692 __u16 rcode, correlator; 3692 __u16 rcode, correlator;
3693 int err = 0; 3693 int err = 0;
3694 __u8 xframe = 1; 3694 __u8 xframe = 1;
3695 __u16 tx_fstatus;
3696 3695
3697 rmf->vl = SWAP_BYTES(rmf->vl); 3696 rmf->vl = SWAP_BYTES(rmf->vl);
3698 if(rx_status & FCB_RX_STATUS_DA_MATCHED) 3697 if(rx_status & FCB_RX_STATUS_DA_MATCHED)
@@ -3783,7 +3782,9 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
3783 } 3782 }
3784 break; 3783 break;
3785 3784
3786 case TX_FORWARD: 3785 case TX_FORWARD: {
3786 __u16 uninitialized_var(tx_fstatus);
3787
3787 if((rcode = smctr_rcv_tx_forward(dev, rmf)) 3788 if((rcode = smctr_rcv_tx_forward(dev, rmf))
3788 != POSITIVE_ACK) 3789 != POSITIVE_ACK)
3789 { 3790 {
@@ -3811,6 +3812,7 @@ static int smctr_process_rx_packet(MAC_HEADER *rmf, __u16 size,
3811 } 3812 }
3812 } 3813 }
3813 break; 3814 break;
3815 }
3814 3816
3815 /* Received MAC Frames Processed by CRS/REM/RPS. */ 3817 /* Received MAC Frames Processed by CRS/REM/RPS. */
3816 case RSP: 3818 case RSP: