mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Chua <jchua@fedex.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, Jeff Chua <jchua@fedex.com>,
	Jeff Chua <jeffchua@silk.corp.fedex.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] warning: `__attribute_used__' redefined
Date: Wed, 11 Feb 2004 21:07:22 +0800 (SGT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0402112105090.341@boston.corp.fedex.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0402100827100.2128@home.osdl.org>

On Tue, 10 Feb 2004, Linus Torvalds wrote:

> On Tue, 10 Feb 2004, Andrew Morton wrote:
> > ah, thanks.
> > Like this?
> That will just break. The reason for the "compiler.h" include is the
> "__user" part of fpstate, so now you'll get a parse error later if
> non-kernel code includes this.
>
> So the rule should still be: don't include kernel headers from user
> programs. But if it's needed for some reason, that #ifdef needs to be
> somewhere else (inside "compiler.h" or something).

So, what's wrong with the patch I posted earlier. I've verified that it
works with just one place to patch, and that makes all warnings went away.

Patch attached here again.

Thanks,
Jeff

--- linux-2.6.2/include/linux/compiler-gcc2.h	Wed Feb  4 11:45:02 2004
+++ linux-2.6.3-rc2/include/linux/compiler-gcc2.h	Tue Feb 10 14:30:04 2004
@@ -12,6 +12,10 @@
 # define __builtin_expect(x, expected_value) (x)
 #endif

+#ifdef __attribute_used__
+#undef __attribute_used__
+#endif
+
 #define __attribute_used__	__attribute__((__unused__))

 /*

      parent reply	other threads:[~2004-02-11 13:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-10  6:39 Jeff Chua
2004-02-10  6:53 ` Andrew Morton
2004-02-10 13:59   ` Jeff Chua
2004-02-10 16:25     ` Andrew Morton
2004-02-10 16:31       ` Linus Torvalds
2004-02-10 17:10         ` Daniel Jacobowitz
2004-02-10 17:18           ` Linus Torvalds
2004-02-10 17:28           ` Valdis.Kletnieks
2004-02-10 17:37         ` Andrew Morton
2004-02-11 13:07         ` Jeff Chua [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=Pine.LNX.4.58.0402112105090.341@boston.corp.fedex.com \
    --to=jchua@fedex.com \
    --cc=akpm@osdl.org \
    --cc=jeffchua@silk.corp.fedex.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 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®