All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Paul Jackson <pj@sgi.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpuset: sparse warnings in cpuset.c
Date: Sat, 23 Feb 2008 00:04:34 -0800	[thread overview]
Message-ID: <20080223000434.7322d1c9.akpm@linux-foundation.org> (raw)
In-Reply-To: <1202024543.1844.57.camel@brick>

On Sat, 02 Feb 2008 23:42:23 -0800 Harvey Harrison <harvey.harrison@gmail.com> wrote:

        ^^^^^^ I suck.

> Don't redeclare p, use a new variable q.
> 
> kernel/cpuset.c:824:23: warning: symbol 'p' shadows an earlier one
> kernel/cpuset.c:746:21: originally declared here
> kernel/cpuset.c:1272:52: warning: Using plain integer as NULL pointer
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> ---
> Paul, used a variable q instead as per your request.
> 
>  kernel/cpuset.c |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/kernel/cpuset.c b/kernel/cpuset.c
> index cfaf641..ce0cfff 100644
> --- a/kernel/cpuset.c
> +++ b/kernel/cpuset.c
> @@ -821,13 +821,13 @@ static int update_cpumask(struct cpuset *cs, char *buf)
>  	cgroup_iter_end(cgrp, &it);
>  	if (heap.size) {
>  		for (i = 0; i < heap.size; i++) {
> -			struct task_struct *p = heap.ptrs[i];
> +			struct task_struct *q = heap.ptrs[i];
>  			if (i == 0) {
> -				latest_time = p->start_time;
> -				latest_task = p;
> +				latest_time = q->start_time;
> +				latest_task = q;
>  			}
> -			set_cpus_allowed(p, cs->cpus_allowed);
> -			put_task_struct(p);
> +			set_cpus_allowed(q, cs->cpus_allowed);
> +			put_task_struct(q);
>  		}
>  		/*
>  		 * If we had to process any tasks at all, scan again

Sorry, the above code doesn't seem to exist any more.

  parent reply	other threads:[~2008-02-23  8:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-03  6:20 [PATCH] cpuset: sparse warnings in cpuset.c Harvey Harrison
2008-02-03  7:28 ` Paul Jackson
2008-02-03  7:42   ` Harvey Harrison
2008-02-03  7:57     ` Paul Jackson
2008-02-23  8:04     ` Andrew Morton [this message]
2008-02-23 13:08       ` Paul Jackson

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=20080223000434.7322d1c9.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    /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 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.