OpenVZ Forum


Home » Mailing lists » Devel » Re: [PATCH] Remove write-only variable from pktgen_thread
Re: [PATCH] Remove write-only variable from pktgen_thread [message #19806] Wed, 29 August 2007 21:33 Go to next message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
Pavel Emelianov [xemul@openvz.org] wrote:
| 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>

Good observation that its not being used :-)

Acked-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
| 
| ---
| 
| diff --git a/net/core/pktgen.c b/net/core/pktgen.c
| index 3a3154e..93695c2 100644
| --- a/net/core/pktgen.c
| +++ b/net/core/pktgen.c
| @@ -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;
| @@ -3462,8 +3461,6 @@ static int pktgen_thread_worker(void *ar
| 
| 	init_waitqueue_head(&t->queue);
| 
| -	t->pid = current->pid;
| -
| 	pr_debug("pktgen: starting pktgen/%d:  pid=%d\n", cpu, 
| 	task_pid_nr(current));
| 
| 	max_before_softirq = t->max_before_softirq;
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH] Remove write-only variable from pktgen_thread [message #19857 is a reply to message #19806] Fri, 31 August 2007 05:46 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: sukadev@us.ibm.com
Date: Wed, 29 Aug 2007 14:33:56 -0700

> Pavel Emelianov [xemul@openvz.org] wrote:
> | 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>
> 
> Good observation that its not being used :-)
> 
> Acked-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>

Patch applied, thanks.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [ANNOUNCE] The Linux Test Project has been Released for AUGUST 2007
Next Topic: containers - bug
Goto Forum:
  


Current Time: Thu Aug 15 14:15:30 GMT 2024

Total time taken to generate the page: 0.02831 seconds