James Fidell wrote:
>
> Quoting Andrey Savochkin (saw@saw.sw.com.sg):
>
> > I've prepared eepro100 driver update for 2.3/4 kernels.
>
> This:
>
> > +#ifdef MODULE
> > +static int debug = -1; /* The debug level */
> > +#endif
>
> Seems to be incompatible with this:
>
> > static int __init eepro100_init_module(void)
> > {
> > + if (debug >= 0 && speedo_debug != debug)
> > + printk(KERN_INFO "eepro100.c: Debug level is %d.\n", debug);
> > if (debug >= 0)
> > speedo_debug = debug;
If 'debug' can't be altered in a static compile, make it a literal
constant:
#ifdef MODULE
static int debug - -1;
#else
#define debug 0
#endif
This will allow the compiler's dead code elimination to remove the debug
code entirely. Typically removes 1-2 k of dead code from net drivers.
-- -akpm-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:21 EST