From: Matthew Wilcox <matthew@wil.cx>
To: kernel-janitors@vger.kernel.org
Subject: Re: Fix sparse warning
Date: Fri, 23 Oct 2009 11:14:47 +0000 [thread overview]
Message-ID: <20091023111446.GA19566@parisc-linux.org> (raw)
In-Reply-To: <4ADCD559.9080807@sysvalve.homelinux.net>
On Fri, Oct 23, 2009 at 09:59:11AM +0200, Ingo Molnar wrote:
> Warnings are not something that should be 'fixed' - they are just a sign
> of some sort of trouble:
>
> 1- bug/limitation in the tool (Sparse)
> 2- uncleanliness in the source code
> 3- bug in the source code
>
> here it seems to be case #1, as file scope statics are perfectly fine,
> even if used by a single function.
This is case #2. We used to have:
int do_one_initcall(initcall_t fn)
{
struct boot_trace_call call;
}
static void __init do_initcalls(void)
{
initcall_t *call;
}
static void __init do_pre_smp_initcalls(void)
{
initcall_t *call;
}
and you changed it so that the boot_trace_call is now file-scope. Now
sparse rightfully warns about the shadow definitions in do_initcalls and
do_pre_smp_initcalls.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2009-10-23 11:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-10-23 11:38 ` Ingo Molnar
2009-10-23 11:51 ` Matthew Wilcox
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=20091023111446.GA19566@parisc-linux.org \
--to=matthew@wil.cx \
--cc=kernel-janitors@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.