All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpuset: sparse warnings in cpuset.c
Date: Sun, 3 Feb 2008 01:28:15 -0600	[thread overview]
Message-ID: <20080203012815.05a50b13.pj@sgi.com> (raw)
In-Reply-To: <1202019619.1844.52.camel@brick>

Harvey wrote:
> No need to redeclare p, we have finished with it at this point,
> so reuse it in the for loop.

Good catch, however I disagree with the fix.  It makes the code more
brittle.

It's not a good idea to reuse a variable for some other purpose just
because you "know" the original use is dead. Things don't necessarily
stay dead; code moves around.

Could you prepare a revised version of this patch, that instead of
dropping that declaration of 'p', rather renames it to 'q' ?

Thanks.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214

  reply	other threads:[~2008-02-03  7:28 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 [this message]
2008-02-03  7:42   ` Harvey Harrison
2008-02-03  7:57     ` Paul Jackson
2008-02-23  8:04     ` Andrew Morton
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=20080203012815.05a50b13.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.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 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.