lkml.org 
[lkml]   [2009]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] move #define pr_fmt KBUILD_MODNAME and KMSG_COMPONENT to Makefiles?
From
Date
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



\
 
 \ /
  Last update: 2009-09-30 16:55    [W:0.059 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site