This is a fairly basic code cleanup that annoyed me while working
on the first patch.
---
diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h
index d5d092c..5d7cc84 100644
--- a/drivers/net/ipg.h
+++ b/drivers/net/ipg.h
@@ -789,11 +789,6 @@ struct ipg_rx {
        __le64 frag_info;
 };
 
-struct SJumbo {
-       int FoundStart;
-       int CurrentSize;
-       struct sk_buff *skb;
-};
 /* Structure of IPG NIC specific data. */
 struct ipg_nic_private {
        void __iomem *ioaddr;
@@ -809,7 +804,11 @@ struct ipg_nic_private {
        unsigned int rx_dirty;
 // Add by Grace 2005/05/19
 #ifdef JUMBO_FRAME
-       struct SJumbo Jumbo;
+       struct SJumbo {
+               bool FoundStart;
+               int CurrentSize;
+               struct sk_buff *skb;
+       } Jumbo;
 #endif
        unsigned int rx_buf_sz;
        struct pci_dev *pdev;
diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h
index d5d092c..5d7cc84 100644
--- a/drivers/net/ipg.h
+++ b/drivers/net/ipg.h
@@ -789,11 +789,6 @@ struct ipg_rx {
        __le64 frag_info;
 };
 
-struct SJumbo {
-       int FoundStart;
-       int CurrentSize;
-       struct sk_buff *skb;
-};
 /* Structure of IPG NIC specific data. */
 struct ipg_nic_private {
        void __iomem *ioaddr;
@@ -809,7 +804,11 @@ struct ipg_nic_private {
        unsigned int rx_dirty;
 // Add by Grace 2005/05/19
 #ifdef JUMBO_FRAME
-       struct SJumbo Jumbo;
+       struct SJumbo {
+               bool FoundStart;
+               int CurrentSize;
+               struct sk_buff *skb;
+       } Jumbo;
 #endif
        unsigned int rx_buf_sz;
        struct pci_dev *pdev;
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index a0dfba5..3860fcd 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -1206,7 +1206,7 @@ static void ipg_nic_rx_with_start_and_end(struct 
net_device *dev,
 
        if (jumbo->FoundStart) {
                IPG_DEV_KFREE_SKB(jumbo->skb);
-               jumbo->FoundStart = 0;
+               jumbo->FoundStart = false;
                jumbo->CurrentSize = 0;
                jumbo->skb = NULL;
        }
@@ -1257,7 +1257,7 @@ static void ipg_nic_rx_with_start(struct net_device *dev,
 
        skb_put(skb, IPG_RXFRAG_SIZE);
 
-       jumbo->FoundStart = 1;
+       jumbo->FoundStart = true;
        jumbo->CurrentSize = IPG_RXFRAG_SIZE;
        jumbo->skb = skb;
 
@@ -1303,14 +1303,14 @@ static void ipg_nic_rx_with_end(struct net_device *dev,
                }
 
                dev->last_rx = jiffies;
-               jumbo->FoundStart = 0;
+               jumbo->FoundStart = false;
                jumbo->CurrentSize = 0;
                jumbo->skb = NULL;
 
                ipg_nic_rx_free_skb(dev, entry);
        } else {
                IPG_DEV_KFREE_SKB(jumbo->skb);
-               jumbo->FoundStart = 0;
+               jumbo->FoundStart = false;
                jumbo->CurrentSize = 0;
                jumbo->skb = NULL;
        }
@@ -1340,7 +1340,7 @@ static void ipg_nic_rx_no_start_no_end(struct net_device 
*dev,
                }
        } else {
                IPG_DEV_KFREE_SKB(jumbo->skb);
-               jumbo->FoundStart = 0;
+               jumbo->FoundStart = false;
                jumbo->CurrentSize = 0;
                jumbo->skb = NULL;
        }
@@ -1840,7 +1840,7 @@ static int ipg_nic_open(struct net_device *dev)
 
 #ifdef JUMBO_FRAME
        /* initialize JUMBO Frame control variable */
-       sp->Jumbo.FoundStart = 0;
+       sp->Jumbo.FoundStart = false;
        sp->Jumbo.CurrentSize = 0;
        sp->Jumbo.skb = 0;
        dev->mtu = IPG_TXFRAG_SIZE;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to