Skip to contentSkip to conversation

staging-slicoss: Kill directly reference of netdev->priv

PATCH In review Wang Chen 2 participants 3 messages Dec 5, 2008 – Dec 8, 2008

Subsystems (3)
lore
Share & tools
lore

Wang Chen

author
#0 lore raw

PATCH 1/1 staging-slicoss: Kill directly reference of netdev->priv

Simply replace netdev->priv with netdev_priv().

Compile test only.

---
 drivers/staging/slicoss/slicoss.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/staging/slicoss/slicoss.c +3 -4
index 8fa9490..0039036 100644
@@ -765,8 +765,7 @@ static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 #ifdef SLIC_USER_REQUEST_DUMP_ENABLED
 	case SIOCSLICDUMPCARD:
 		{
-			struct adapter *adapter = (struct adapter *)
-							dev->priv;
+			struct adapter *adapter = netdev_priv(dev);
 			struct sliccard *card;
 
 			ASSERT(adapter);
@@ -1685,7 +1684,7 @@ static void slic_timer_ping(ulong dev)
 	struct sliccard *card;
 
 	ASSERT(dev);
-	adapter = (struct adapter *)((struct net_device *) dev)->priv;
+	adapter = netdev_priv((struct net_device *)dev);
 	ASSERT(adapter);
 	card = adapter->card;
 	ASSERT(card);
@@ -3136,7 +3135,7 @@ static void slic_timer_get_stats(ulong dev)
 	struct slic_shmem *pshmem;
 
 	ASSERT(dev);
-	adapter = (struct adapter *)((struct net_device *)dev)->priv;
+	adapter = netdev_priv((struct net_device *)dev);
 	ASSERT(adapter);
 	card = adapter->card;
 	ASSERT(card);
Signature · 1 line
1.5.3.4
maintainer
#1 lore raw

From: Wang Chen <[email protected]>
Date: Fri, 05 Dec 2008 23:21:15 +0800

Quoted 5 lines

Simply replace netdev->priv with netdev_priv().

Compile test only.

Also applied, thanks Wang.

Wang, how much more of this stuff do you estimate we still have to fix up before we can really kill off ->priv?

Just curious...

author
#2 lore raw

David Miller said the following on 2008-12-7 15:59:

Quoted 7 lines

From: Wang Chen <[email protected]>
Date: Fri, 05 Dec 2008 23:21:15 +0800

Quoted 4 lines

Simply replace netdev->priv with netdev_priv().

Compile test only.

Quoted 9 lines
Quoted 1 line

Also applied, thanks Wang.

Wang, how much more of this stuff do you estimate we still have to fix up before we can really kill off ->priv?

Just curious...

Only one left, as I grepped last week.
I will finish it this week.