From: Adrian Bunk <bunk@fs.tum.de>
To: mcalinux@acc.umu.se, tao@acc.umu.se,
linux-kernel@vger.kernel.org, jgarzik@pobox.com,
linux-net@vger.kernel.org, James.Bottomley@SteelEye.com,
linux-scsi@vger.kernel.org
Subject: Re: [2.6 patch] more MCA_LEGACY dependencies
Date: Fri, 2 Jul 2004 20:30:04 +0200 [thread overview]
Message-ID: <20040702183004.GJ28324@fs.tum.de> (raw)
In-Reply-To: <20040702130719.GC13384@lorien.prodam>
On Fri, Jul 02, 2004 at 10:07:19AM -0300, Luiz Fernando N. Capitulino wrote:
>...
> | static int __init smctr_chk_mca(struct net_device *dev)
> | {
> | -#ifdef CONFIG_MCA
> | +#ifdef CONFIG_MCA_LEGACY
> | struct net_local *tp = netdev_priv(dev);
> | int current_slot;
> | __u8 r1, r2, r3, r4, r5;
> | @@ -626,7 +626,7 @@
> | return (0);
> | #else
> | return (-1);
> | -#endif /* CONFIG_MCA */
> | +#endif /* CONFIG_MCA_LEGACY */
> | }
>
> what about doing things like that for #ifdef/#endif inside
> functions? (not compiled):
>...
> +#ifdef CONFIG_MCA_LEGACY
> static int __init smctr_chk_mca(struct net_device *dev)
> {
> -#ifdef CONFIG_MCA
> struct net_local *tp = netdev_priv(dev);
> int current_slot;
> __u8 r1, r2, r3, r4, r5;
>...
> --- a/drivers/net/tokenring/smctr.h 2003-10-08 16:24:14.000000000 -0300
> +++ a~/drivers/net/tokenring/smctr.h 2004-07-02 09:56:56.000000000 -0300
> @@ -9,6 +9,11 @@
>
> #ifdef __KERNEL__
>
> +/* when !CONFIG_MCA_LEGACY */
> +#ifndef CONFIG_MCA_LEGACY
> +static inline smctr_chk_mca(struct net_device *dev) { return (-1); }
> +#endif
> +
>...
What's the advantage of your approach?
All it seems to do is to make the code less readable.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
prev parent reply other threads:[~2004-07-02 18:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-02 0:25 Adrian Bunk
2004-07-02 13:07 ` Luiz Fernando N. Capitulino
2004-07-02 18:30 ` Adrian Bunk [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=20040702183004.GJ28324@fs.tum.de \
--to=bunk@fs.tum.de \
--cc=James.Bottomley@SteelEye.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mcalinux@acc.umu.se \
--cc=tao@acc.umu.se \
/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®