All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] dp83640: Make use of skb_queue_purge instead of reimplementing the code
@ 2014-09-08 15:25 Alexander Duyck
  2014-09-08 19:05 ` Richard Cochran
  2014-09-08 21:24 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Duyck @ 2014-09-08 15:25 UTC (permalink / raw)
  To: netdev; +Cc: richardcochran, davem

This change makes it so that dp83640_remove can use skb_queue_purge
instead of looping through itself to flush any entries out of the queue.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
 drivers/net/phy/dp83640.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 87648b3..99b5d20 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1136,7 +1136,6 @@ static void dp83640_remove(struct phy_device *phydev)
 	struct dp83640_clock *clock;
 	struct list_head *this, *next;
 	struct dp83640_private *tmp, *dp83640 = phydev->priv;
-	struct sk_buff *skb;
 
 	if (phydev->addr == BROADCAST_ADDR)
 		return;
@@ -1144,11 +1143,8 @@ static void dp83640_remove(struct phy_device *phydev)
 	enable_status_frames(phydev, false);
 	cancel_work_sync(&dp83640->ts_work);
 
-	while ((skb = skb_dequeue(&dp83640->rx_queue)) != NULL)
-		kfree_skb(skb);
-
-	while ((skb = skb_dequeue(&dp83640->tx_queue)) != NULL)
-		kfree_skb(skb);
+	skb_queue_purge(&dp83640->rx_queue);
+	skb_queue_purge(&dp83640->tx_queue);
 
 	clock = dp83640_clock_get(dp83640->clock);
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] dp83640: Make use of skb_queue_purge instead of reimplementing the code
  2014-09-08 15:25 [PATCH net-next] dp83640: Make use of skb_queue_purge instead of reimplementing the code Alexander Duyck
@ 2014-09-08 19:05 ` Richard Cochran
  2014-09-08 21:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Cochran @ 2014-09-08 19:05 UTC (permalink / raw)
  To: Alexander Duyck; +Cc: netdev, davem

On Mon, Sep 08, 2014 at 11:25:34AM -0400, Alexander Duyck wrote:
> This change makes it so that dp83640_remove can use skb_queue_purge
> instead of looping through itself to flush any entries out of the queue.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>

Acked-by: Richard Cochran <richardcochran@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] dp83640: Make use of skb_queue_purge instead of reimplementing the code
  2014-09-08 15:25 [PATCH net-next] dp83640: Make use of skb_queue_purge instead of reimplementing the code Alexander Duyck
  2014-09-08 19:05 ` Richard Cochran
@ 2014-09-08 21:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-09-08 21:24 UTC (permalink / raw)
  To: alexander.h.duyck; +Cc: netdev, richardcochran

From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Mon, 08 Sep 2014 11:25:34 -0400

> This change makes it so that dp83640_remove can use skb_queue_purge
> instead of looping through itself to flush any entries out of the queue.
> 
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>

Applied, thanks Alex.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-08 21:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 15:25 [PATCH net-next] dp83640: Make use of skb_queue_purge instead of reimplementing the code Alexander Duyck
2014-09-08 19:05 ` Richard Cochran
2014-09-08 21:24 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.