From: Sam Ravnborg <sam@ravnborg.org>
To: Andreas Schwab <schwab@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>,
janitors <kernel-janitors@vger.kernel.org>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: Many warnings from our userspace headers
Date: Tue, 30 Dec 2008 13:07:25 +0100 [thread overview]
Message-ID: <20081230120725.GA4622@uranus.ravnborg.org> (raw)
In-Reply-To: <jeiqp2j645.fsf@sykes.suse.de>
On Tue, Dec 30, 2008 at 11:43:22AM +0100, Andreas Schwab wrote:
> Sam Ravnborg <sam@ravnborg.org> writes:
>
> > /home/sam/kernel/knext.git/usr/include/linux/acct.h:62: leaks CONFIG_M68K to userspace where it is not valid
>
> IMHO this is a false positive, since it is protected by __KERNEL__ in
> the same expression.
Correct - but we can rewrite it like this:
diff --git a/include/linux/acct.h b/include/linux/acct.h
index 882dc72..bcc6d2f 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -59,8 +59,12 @@ struct acct
comp_t ac_majflt; /* Major Pagefaults */
comp_t ac_swaps; /* Number of Swaps */
/* m68k had no padding here. */
-#if !defined(CONFIG_M68K) || !defined(__KERNEL__)
+#ifndef __KERNEL__
__u16 ac_ahz; /* AHZ */
+#else
+ #ifndef CONFIG_M68K
+ __u16 ac_ahz; /* AHZ */
+ #endif
#endif
__u32 ac_exitcode; /* Exitcode */
char ac_comm[ACCT_COMM + 1]; /* Command Name */
This is at least for me also easier to parse.
So we remove a (bogus) warning and make the code easier to read.
Sam
prev parent reply other threads:[~2008-12-30 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-30 10:33 Many warnings from our userspace headers Sam Ravnborg
2008-12-30 10:43 ` Andreas Schwab
2008-12-30 12:07 ` Sam Ravnborg [this message]
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=20081230120725.GA4622@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
/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