lkml.org 
[lkml]   [2006]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/12] making the kernel -Wshadow clean - fix mconf
On 30/07/06, Paul Jackson <pj@sgi.com> wrote:
> Jesper wrote:
> > - cprint("%s", filename);
> > + cprint("%s", config_filename);
>
> Something seems strange here to me. It looks like you are sometimes
> resolving the shadowed symbols by making the more local symbol have the
> longer name.
>
True.

> I'd have expected that the global symbol would be the one with the
> longer, more elaborate name.
>
Generally I'd agree with you, but my initial objective is to resolve
all (or at least most) of the clashes with as little pain as pssible
initially so that we can get to the point where we can add -Wshadow to
the Makefile - sometimes the path of least resistence is making the
local name longer.


> In other words, I would have expected that we would avoid having global
> names such as (from your other patches in this set):
>
> filename

Here I changed the global to be longer - config_filename.

> scroll

made the local longer - guilty as charged.


> instr

I don't recall using that variable name - I believe you mean 'intr'
for interrupt that I used in place of 'irq'.


> up

I'd *love* to change this one - and down() as well - to up_sem() &
down_sem(). But, making that change would be a pretty major and
somewhat disruptive api change, so I opted instead to change the local
variable names. I plan to introduce a sepperate patch set later on
that adds up_sem()/down_sem() wrappers around up()/down(), deprecate
the old names and add an entry to feature-removal.txt - but doing it
now as part of the -Wshadow cleanup would be too much pain.

> sum
> state
> rep
> complete
> irq
>

Yes, here I made the local name longer. Long term that should probably
change. Short term it seemed the path of least resistance.


> Perhaps I am misreading this patch set?
>
i don't think you are. It's just that I want to take the least
intrusive route *now*, make us -Wshadow clean, get -Wshadow to be an
accepted part of the Makefile, *then* deal with the more
intrusive/controversial renamings, where I guess you'd have done
things in the opposite order - right?


--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-30 20:51    [W:0.116 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site