Netdev List
 help / color / mirror / Atom feed
* [PATCH 2/3] drivers/net/ipg.c: convert Jumbo.FoundStart to bool
@ 2008-01-08 12:32 linux
  0 siblings, 0 replies; only message in thread
From: linux @ 2008-01-08 12:32 UTC (permalink / raw)
  To: netdev, romieu; +Cc: akpm, davem, linux

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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-08 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08 12:32 [PATCH 2/3] drivers/net/ipg.c: convert Jumbo.FoundStart to bool linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox