login
Header Space

 
 

[PATCH 5/7] drivers/net/ixgb/ixgb_main.c: remove unused variable

Previous thread: [PATCH 4/7] sound/pci: remove unused variable by Julia Lawall on Saturday, March 15, 2008 - 12:03 pm. (2 messages)

Next thread: [PATCH 6/7] drivers/net/ipg.c: remove unused variable by Julia Lawall on Saturday, March 15, 2008 - 12:04 pm. (2 messages)
To: <jeffrey.t.kirsher@...>, <ayyappan.veeraiyan@...>, <john.ronciak@...>, <jesse.brandeburg@...>, <auke-jan.h.kok@...>, <e1000-devel@...>, <linux-kernel@...>, <kernel-janitors@...>
Date: Saturday, March 15, 2008 - 12:04 pm

From: Julia Lawall &lt;julia@diku.dk&gt;

The variable num_group_tail_writes is initialized but never used otherwise.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  &lt;+... when != i
- i = C;
  ...+&gt;
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
---
 drivers/net/ixgb/ixgb_main.c |    2 --
 1 file changed, 2 deletions(-)

diff -u -p a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
--- a/drivers/net/ixgb/ixgb_main.c 2008-03-12 14:13:13.000000000 +0100
+++ b/drivers/net/ixgb/ixgb_main.c 2008-03-15 11:16:23.000000000 +0100
@@ -2088,14 +2088,12 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte
 	struct ixgb_buffer *buffer_info;
 	struct sk_buff *skb;
 	unsigned int i;
-	int num_group_tail_writes;
 	long cleancount;
 
 	i = rx_ring-&gt;next_to_use;
 	buffer_info = &amp;rx_ring-&gt;buffer_info[i];
 	cleancount = IXGB_DESC_UNUSED(rx_ring);
 
-	num_group_tail_writes = IXGB_RX_BUFFER_WRITE;
 
 	/* leave three descriptors unused */
 	while(--cleancount &gt; 2) {
--
To: Julia Lawall <julia@...>
Cc: <jeffrey.t.kirsher@...>, <ayyappan.veeraiyan@...>, <john.ronciak@...>, <jesse.brandeburg@...>, <auke-jan.h.kok@...>, <e1000-devel@...>, <linux-kernel@...>, <kernel-janitors@...>
Date: Monday, March 17, 2008 - 12:37 pm

OK, i'll pass it along. ty


--
Previous thread: [PATCH 4/7] sound/pci: remove unused variable by Julia Lawall on Saturday, March 15, 2008 - 12:03 pm. (2 messages)

Next thread: [PATCH 6/7] drivers/net/ipg.c: remove unused variable by Julia Lawall on Saturday, March 15, 2008 - 12:04 pm. (2 messages)
speck-geostationary