mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Richard Henderson <rth@twiddle.net>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com,
	Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Subject: Re: [PATCH] eliminate warnings in generated module files
Date: Tue, 25 Feb 2003 15:32:21 +1100	[thread overview]
Message-ID: <20030225050306.F0BF82C19D@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 18 Feb 2003 18:43:17 -0800." <20030218184317.A20436@twiddle.net>

In message <20030218184317.A20436@twiddle.net> you write:
> +#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || __GNUC__ > 3
> +#define __attribute_used__	__attribute__((__used__))
> +#else
> +#define __attribute_used__	__attribute__((__unused__))
> +#endif
> +

After some thought, I prefer __optional.  The unused attribute has
muddied the waters too badly for "used" or "unused" to be clear.

We could debate this for days.  Linus, apply or don't.
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Name: __optional attribute
Author: Rusty Russell
Status: Trivial

D: Renames __attribute_used to __optional.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .21098-linux-2.5.63/include/linux/compiler.h .21098-linux-2.5.63.updated/include/linux/compiler.h
--- .21098-linux-2.5.63/include/linux/compiler.h	2003-02-25 10:11:08.000000000 +1100
+++ .21098-linux-2.5.63.updated/include/linux/compiler.h	2003-02-25 15:28:39.000000000 +1100
@@ -37,9 +37,9 @@
  * would be warned about except with attribute((unused)).
  */
 #if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || __GNUC__ > 3
-#define __attribute_used__	__attribute__((__used__))
+#define __optional	__attribute__((__used__))
 #else
-#define __attribute_used__	__attribute__((__unused__))
+#define __optional	__attribute__((__unused__))
 #endif
 
 /* This macro obfuscates arithmetic on a variable address so that gcc
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .21098-linux-2.5.63/scripts/modpost.c .21098-linux-2.5.63.updated/scripts/modpost.c
--- .21098-linux-2.5.63/scripts/modpost.c	2003-02-25 10:11:14.000000000 +1100
+++ .21098-linux-2.5.63.updated/scripts/modpost.c	2003-02-25 15:30:37.000000000 +1100
@@ -450,7 +450,7 @@ add_depends(struct buffer *b, struct mod
 
 	buf_printf(b, "\n");
 	buf_printf(b, "static const char __module_depends[]\n");
-	buf_printf(b, "__attribute_used__\n");
+	buf_printf(b, "__optional\n");
 	buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n");
 	buf_printf(b, "\"depends=");
 	for (s = mod->unres; s; s = s->next) {

  parent reply	other threads:[~2003-02-25  4:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-19  2:43 Richard Henderson
2003-02-19  3:29 ` Linus Torvalds
2003-02-19  3:43   ` Richard Henderson
2003-02-19  5:16     ` Linus Torvalds
2003-02-19  6:16       ` Richard Henderson
2003-02-19 20:11         ` Kai Germaschewski
2003-02-19 21:05           ` Richard Henderson
2003-02-20  0:01         ` Rusty Russell
2003-02-19 23:41       ` Chris Wedgwood
2003-02-25  4:32 ` Rusty Russell [this message]
2003-02-25  7:58   ` Richard Henderson
2003-02-25 11:39     ` Rusty Russell
2003-02-25 23:47       ` Linus Torvalds
2003-02-26  1:22         ` Rusty Russell
2003-02-26  1:36           ` Kai Germaschewski
2003-02-26  4:13             ` Rusty Russell
2003-02-26 17:02               ` Horst von Brand
2003-02-26 17:04               ` Richard Henderson
2003-02-26  3:35           ` Randy.Dunlap
2003-02-26  4:08             ` Rusty Russell
2003-02-26 13:45               ` Werner Almesberger
2003-02-25 21:42     ` Chris Wedgwood
2003-02-26  2:23 Milton D. Miller II

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=20030225050306.F0BF82C19D@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=kai@tp1.ruhr-uni-bochum.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    --cc=torvalds@transmeta.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®