Skip to content

Commit

Permalink
[PKTGEN]: Remove write-only variable.
Browse files Browse the repository at this point in the history
The pktgen_thread.pid is set to current->pid and is never used
after this. So remove this at all.

Found during isolating the explicit pid/tgid usage.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Aug 31, 2007
1 parent a289d70 commit 88282c6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ struct pktgen_thread {
/* Field for thread to receive "posted" events terminate, stop ifs etc. */

u32 control;
int pid;
int cpu;

wait_queue_head_t queue;
Expand Down Expand Up @@ -3463,8 +3462,6 @@ static int pktgen_thread_worker(void *arg)

init_waitqueue_head(&t->queue);

t->pid = current->pid;

pr_debug("pktgen: starting pktgen/%d: pid=%d\n", cpu, current->pid);

max_before_softirq = t->max_before_softirq;
Expand Down

0 comments on commit 88282c6

Please sign in to comment.