From: Joe Perches <joe@perches.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Sam Ravnborg <sam@ravnborg.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] move #define pr_fmt KBUILD_MODNAME and KMSG_COMPONENT to Makefiles?
Date: Wed, 30 Sep 2009 07:52:58 -0700 [thread overview]
Message-ID: <1254322378.2960.86.camel@Joe-Laptop.home> (raw)
In-Reply-To: <20090930112023.4fbb3da0@mschwide.boeblingen.de.ibm.com>
On Wed, 2009-09-30 at 11:20 +0200, Martin Schwidefsky wrote:
> On Wed, 30 Sep 2009 00:54:59 -0700
> Joe Perches <joe@perches.com> wrote:
> > If something like were added to a module Makefile:
> > ccflags-y += -D "pr_fmt(fmt)=KBUILD_MODNAME \": \" fmt"
>
> Where is the difference between the definition of the macro in the
> source file? It's still one additional line, no?
Look at net/netfilter/ipvs for instance.
It would have been possible to add:
ccflags-y += -D "KMSG_COMPONENT=IPVS"
ccflags-y += -D "pr_fmt(fmt)=KMSG_COMPONENT \": \" fmt"
to net/netfilter/ipvs/Makefile instead of adding it
to 23 files.
Same sort of thing for drivers/s390/char/Makefile,
though it's less beneficial there.
Multiple
CFLAGS_foo.o += -D "KMSG_COMPONENT=foo"
and a single
ccflags-y += -D "pr_fmt(fmt)=KMSG_COMPONENT \": \" fmt"
> And if you are dreaming of converting all source files
> to the pr_fmt mechanism, this is a big effort ..
I think it could be a useful mechanism to define pr_fmt
for individual module Makefiles and there's no rush...
cheers, Joe
next prev parent reply other threads:[~2009-09-30 14:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-29 18:15 Joe Perches
2009-09-30 6:55 ` Sam Ravnborg
2009-09-30 7:54 ` Joe Perches
2009-09-30 9:20 ` Martin Schwidefsky
2009-09-30 14:52 ` Joe Perches [this message]
2009-10-01 11:02 ` Martin Schwidefsky
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=1254322378.2960.86.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=schwidefsky@de.ibm.com \
/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®