Re: [2.6 patch] more MCA_LEGACY dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux