netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: joe@perches.com
Cc: Robert.Olsson@data.slu.se, netdev@vger.kernel.org
Subject: Re: [PATCH] pktgen - define and use pktgen_dbg,err,warn,info
Date: Mon, 30 Jul 2007 16:05:40 -0700 (PDT)	[thread overview]
Message-ID: <20070730.160540.48528135.davem@davemloft.net> (raw)
In-Reply-To: <1184800861.5863.54.camel@localhost>

From: Joe Perches <joe@perches.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@perches.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.

  reply	other threads:[~2007-07-30 23:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-18 22:14 [PATCH] pktgen - define and use pktgen_dbg,err,warn,info Joe Perches
2007-07-18 22:49 ` David Miller
2007-07-18 23:21   ` Joe Perches
2007-07-30 23:05     ` David Miller [this message]
2007-07-31 23:48       ` Joe Perches
2007-08-01  1:28         ` David Miller

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=20070730.160540.48528135.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Robert.Olsson@data.slu.se \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).