mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: "Paul Jackson" <pj@sgi.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH 01/12] making the kernel -Wshadow clean - fix mconf
Date: Sun, 30 Jul 2006 20:48:23 +0200	[thread overview]
Message-ID: <9a8748490607301148q13992d9cr910a1dadb42e11fd@mail.gmail.com> (raw)
In-Reply-To: <20060730113416.7c1d8f80.pj@sgi.com>

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

  reply	other threads:[~2006-07-30 18:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-30 16:30 [PATCH 00/12] making the kernel -Wshadow clean - The initial step Jesper Juhl
2006-07-30 16:35 ` [PATCH 01/12] making the kernel -Wshadow clean - fix mconf Jesper Juhl
2006-07-30 18:34   ` Paul Jackson
2006-07-30 18:48     ` Jesper Juhl [this message]
2006-07-30 19:06       ` Andrew Morton
2006-07-30 19:17         ` Jesper Juhl
2006-07-30 19:51           ` Andrew Morton
2006-07-30 19:57             ` Arjan van de Ven
2006-07-30 20:03             ` Jesper Juhl
2006-07-30 19:32         ` Paul Jackson
2006-07-30 23:41       ` Arnd Bergmann
2006-07-31 15:41       ` Horst H. von Brand
2006-07-31 16:04         ` H. Peter Anvin
2006-07-30 16:36 ` [PATCH 02/12] making the kernel -Wshadow clean - fix lxdialog Jesper Juhl
2006-07-30 16:37 ` [PATCH 03/12] making the kernel -Wshadow clean - fix jiffies.h Jesper Juhl
2006-07-30 16:38 ` [PATCH 04/12] making the kernel -Wshadow clean - warnings related to 'up' Jesper Juhl
2006-07-30 16:38 ` [PATCH 05/12] making the kernel -Wshadow clean - warnings related to wbc and map_bh Jesper Juhl
2006-07-30 16:39 ` [PATCH 06/12] making the kernel -Wshadow clean - fix checksum Jesper Juhl
2006-07-30 16:40 ` [PATCH 07/12] making the kernel -Wshadow clean - fix vgacon Jesper Juhl
2006-07-30 16:41 ` [PATCH 08/12] making the kernel -Wshadow clean - fix keyboard.c Jesper Juhl
2006-07-30 16:42 ` [PATCH 09/12] making the kernel -Wshadow clean - neighbour.h and 'proc_handler' Jesper Juhl
2006-07-30 16:42 ` [PATCH 10/12] making the kernel -Wshadow clean - mm/truncate.c Jesper Juhl
2006-07-30 16:43 ` [PATCH 11/12] making the kernel -Wshadow clean - USB & completion Jesper Juhl
2006-07-30 16:44 ` [PATCH 12/12] making the kernel -Wshadow clean - 'irq' shadows local and global Jesper Juhl
2006-07-30 16:54 ` [PATCH 00/12] making the kernel -Wshadow clean - The initial step Krzysztof Halasa
2006-07-30 17:14   ` Jesper Juhl
2006-07-30 17:27     ` Krzysztof Halasa
2006-07-30 18:29       ` Andrew Morton
2006-07-30 23:36         ` Arnd Bergmann
2006-08-01  6:17       ` Jan Engelhardt
2006-07-30 19:24 ` Jesper Juhl
2006-07-30 20:09   ` Jan-Benedict Glaw
2006-07-30 19:29 ` Sam Ravnborg
2006-07-30 19:39   ` Jesper Juhl

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=9a8748490607301148q13992d9cr910a1dadb42e11fd@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=akpm@osdl.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®