netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sukadev@us.ibm.com
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andrew Morton <akpm@osdl.org>, Oleg Nesterov <oleg@tv-sign.ru>,
	Linux Containers <containers@lists.osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH] Remove write-only variable from pktgen_thread
Date: Wed, 29 Aug 2007 14:33:56 -0700	[thread overview]
Message-ID: <20070829213356.GC18542@us.ibm.com> (raw)
In-Reply-To: <46D572FA.9090302@openvz.org>

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;

  reply	other threads:[~2007-08-29 21:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 13:22 [PATCH] Remove write-only variable from pktgen_thread Pavel Emelyanov
2007-08-29 21:33 ` sukadev [this message]
2007-08-31  5:46   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070829213356.GC18542@us.ibm.com \
    --to=sukadev@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=containers@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).