public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Richard Henderson <rth@twiddle.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] eliminate warnings in generated module files
Date: Wed, 26 Feb 2003 15:13:09 +1100	[thread overview]
Message-ID: <20030226041359.C54792C04C@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 25 Feb 2003 19:36:10 MDT." <Pine.LNX.4.44.0302251930280.13501-100000@chaos.physics.uiowa.edu>

In message <Pine.LNX.4.44.0302251930280.13501-100000@chaos.physics.uiowa.edu> y
ou write:
> FWIW, I think it's not a good idea. Why call it 'required' in the kernel 
> when the normal (gcc) expression for it is 'used'. - We didn't rename 
> 'deprecated' to 'obsolete', either ;)

But deprecated was a fine name.  "used" is a terrible name, and since
we're renaming it via a macro anyway... (see "likey").

> Also, I don't really see any use for __optional at this point, so why add 
> it at all?

>From ip_conntrack_core.c:

#ifdef CONFIG_SYSCTL
static struct ctl_table_header *ip_conntrack_sysctl_header;

static ctl_table ip_conntrack_table[] = {
	{
		.ctl_name	= NET_IP_CONNTRACK_MAX,
		.procname	= NET_IP_CONNTRACK_MAX_NAME,
		.data		= &ip_conntrack_max,
		.maxlen		= sizeof(ip_conntrack_max),
		.mode		= 0644,
		.proc_handler	= proc_dointvec
	},
 	{ .ctl_name = 0 }
};

static ctl_table ip_conntrack_dir_table[] = {
	{
		.ctl_name	= NET_IPV4,
		.procname	= "ipv4",
		.maxlen		= 0,
		.mode		= 0555,
		.child		= ip_conntrack_table
	},
	{ .ctl_name = 0 }
};

static ctl_table ip_conntrack_root_table[] = {
	{
		.ctl_name	= CTL_NET,
		.procname	= "net",
		.maxlen		= 0,
		.mode		= 0555,
		.child		= ip_conntrack_dir_table
	},
	{ .ctl_name = 0 }
};
#endif /*CONFIG_SYSCTL*/

I'd love to frop the #ifdef and just mark them __optional: before that
would just mean bloat, but when gcc 3.3 rolls in, they should vanish
nicely.

There are numerous other examples...
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-02-26  4:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-19  2:43 [PATCH] eliminate warnings in generated module files 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
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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
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=20030226041359.C54792C04C@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