All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix sparse warning
@ 2009-10-19 21:08 
  2009-10-19 21:35 ` 
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From:  @ 2009-10-19 21:08 UTC (permalink / raw)
  To: kernel-janitors

Hi,

I'm starting to do some cleanup for the project, and I'd like to begin
fixing sparse errors.

By the way, at first glance, it seems that the warnings that sparse
catches may need some depth look (i.e. not a newbiew) not to mess things.

For example, my first compilation sparse checking throws this:


init/main.c:763:13: warning: symbol 'call' shadows an earlier one
init/main.c:710:31: originally declared here
init/main.c:793:13: warning: symbol 'call' shadows an earlier one
init/main.c:710:31: originally declared here

If you take a look at the code, the global "call" variable is defined as:

static struct boot_trace_call call;

And what makes sparse whine is a local variable definition, totally
unrelated (i think):

static void __init do_initcalls(void)
{
    initcall_t *call;

    for (call = __early_initcall_end; call < __initcall_end; call++)
        do_one_initcall(*call);

    /* Make sure there is no pending stuff from the initcall sequence */
    flush_scheduled_work();
}

So, it seems that I could "fix" this by changing the local variable
name. The question is: is this _really_ needed apart from "code
hygiene"? Should I "fix" (if you agree to call that "to fix") that issue?

Or would you otherwise recommend me to start with the official janitor
TODO list and address more mechanical work at first? Thanks in advance.


Regards,

-- 
L. Alberto Giménez
GnuPG key ID 0x3BAABDE1
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-10-23 11:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-19 21:08 Fix sparse warning 
2009-10-19 21:35 ` 
2009-10-20  6:48 ` Matthew Wilcox
2009-10-20  7:24 ` walter harms
2009-10-20 22:02 ` 
2009-10-20 22:08 ` 
2009-10-20 22:24 ` Matthew Wilcox
2009-10-21 11:37 ` Ingo Molnar
2009-10-21 21:18 ` 
2009-10-23  7:59 ` Ingo Molnar
2009-10-23 11:14 ` Matthew Wilcox
2009-10-23 11:38 ` Ingo Molnar
2009-10-23 11:51 ` Matthew Wilcox

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.