[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20060730112917.88d9ae4e.akpm@osdl.org>
Date: Sun, 30 Jul 2006 11:29:17 -0700
From: Andrew Morton <akpm@...l.org>
To: Krzysztof Halasa <khc@...waw.pl>
Cc: jesper.juhl@...il.com, linux-kernel@...r.kernel.org,
nikita@...sterfs.com, joe@...ches.com, tali@...ingilde.org,
jbglaw@...-owl.de, hch@...radead.org, dwmw2@...radead.org,
arjan@...radead.org, dmitry.torokhov@...il.com,
Valdis.Kletnieks@...edu, sam@...nborg.org, rmk@....linux.org.uk,
rusty@...tcorp.com.au, rdunlap@...otime.net
Subject: Re: [PATCH 00/12] making the kernel -Wshadow clean - The initial
step
On Sun, 30 Jul 2006 19:27:36 +0200
Krzysztof Halasa <khc@...waw.pl> wrote:
> "Jesper Juhl" <jesper.juhl@...il.com> writes:
>
> > I think it's a good thing that we have to take a little more care when
> > choosing global function and variable names... Take up() for example -
> > in my (very humble) oppinion that is a very bad name for a global
> > function - it clashes too easily with local function and variable
> > names, and a programmer who's not careful may end up calling the
> > global up() when he wants the local and vice versa (a much better name
> > would have been sem_up() - should we change that???).
>
> Possibly, but it could then conflict with something else. Anytime we
> add/change some global symbol, we would have to scan entire kernel
> for conflicts (authors of (yet) off-tree things would hate us).
These things happen. And it's only a warning.
> I don't think it's practical, especially with, IMHO, no real gain.
While I don't recall any kernel bugs which -Wshadow would have saved us
from, I think it's a sensible thing to do - it _might_ save us from a bug,
and we need all the help we can get.
Plus it's often the case that if a local and a global clash, one of the
identifiers was poorly chosen.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists