[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070730.160540.48528135.davem@davemloft.net>
Date: Mon, 30 Jul 2007 16:05:40 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: joe@...ches.com
Cc: Robert.Olsson@...a.slu.se, netdev@...r.kernel.org
Subject: Re: [PATCH] pktgen - define and use pktgen_dbg,err,warn,info
From: Joe Perches <joe@...ches.com>
Date: Wed, 18 Jul 2007 16:21:00 -0700
> On Wed, 2007-07-18 at 15:49 -0700, David Miller wrote:
> > From: Joe Perches <joe@...ches.com>
> > Date: Wed, 18 Jul 2007 15:14:13 -0700
> >
> > > -#define VERSION "pktgen v2.68: Packet Generator for packet performance testing.\n"
> > > +#define PKTGEN_NAME "pktgen"
> > > +#define PKTGEN_VERSION "v2.68"
> > > +#define PKTGEN_DESC "Packet Generator for packet performance testing"
> > > +#define PKTGEN_FULLINFO PKTGEN_NAME " " PKTGEN_VERSION ": " PKTGEN_DESC ".\n"
> > ...
> >
> > > -static char version[] __initdata = VERSION;
> > > -
> >
> > Using PKTGEN_FULLINFO explicitly won't get that string into the
> > __initdata section as the version[] will, that's why people do it that
> > way with the explicit version[] array.
> >
> > Please put it back, assign PKTGEN_FULLINFO to it, and use it.
>
> Done. Here you are.
>
> fyi:
> pktgen_info(version) fails compile,
> pktgen_info("%s", version) works.
I still don't know about this patch. Instead of the simple
transformation:
- printk(foo);
+ printk(KERN_INFO foo);
we get this new macro, and the lines changes to use that macro.
It seems very over-engineered and adds ifdefs to a foo.c file
which is severly frowned upon.
I'm going to add the needed KERN_* to pktgen.c, that's just so
much nicer a way to handle this.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists