From: Joe Perches <joe@perches.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Patrick McHardy <kaber@trash.net>,
"David S. Miller" <davem@davemloft.net>,
Simon Horman <horms@verge.net.au>, Julian Anastasov <ja@ssi.bg>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
lvs-devel@vger.kernel.org
Subject: Re: [PATCH 1/2] net/netfilter/ipvs: Move #define KMSG_COMPONENT to Makefile
Date: Wed, 30 Sep 2009 17:50:35 -0700 [thread overview]
Message-ID: <1254358235.2960.145.camel@Joe-Laptop.home> (raw)
In-Reply-To: <alpine.LSU.2.00.0910010219100.7559@obet.zrqbmnf.qr>
On Thu, 2009-10-01 at 02:31 +0200, Jan Engelhardt wrote:
> KBUILD_MODNAME is special in that it is derived from the actual
> source filename.
Kind of. It's derived from the module name, not the filename.
> Of course you could put #define KBUILD_MODNAME "foo"
> in your source file, but that is like putting changelogs there
> when they belong into the git log.
I agree with that.
> Well I personally prefer the #include instead of hiding such in
> Makefiles. You know, when newcomers could start doing `grep
> KMSG_COMPONENT *.[ch]`. Perhaps GCC's -include flag in a Makefile
> to avoid #includes in .c files?
I imagine an eventual goal of standardizing the default
pr_fmt define in kernel.h to
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
so that all pr_<level> calls get this unless otherwise
specified.
Or perhaps better, to get rid of pr_fmt(fmt) altogether and
have printk emit the filename/modulename, function and/or
code offset by using something like %pS after the level.
I see the Makefile use, which I don't really like too much
because of the information hiding, as an intermediate step
until that's possible.
next prev parent reply other threads:[~2009-10-01 0:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 22:37 [PATCH 0/2] net/netfilter: Makefile and pr_<level> Joe Perches
2009-09-30 22:37 ` [PATCH 1/2] net/netfilter/ipvs: Move #define KMSG_COMPONENT to Makefile Joe Perches
2009-09-30 22:46 ` Jan Engelhardt
2009-09-30 23:09 ` Joe Perches
2009-10-01 0:31 ` Jan Engelhardt
2009-10-01 0:50 ` Joe Perches [this message]
2009-10-01 8:27 ` Jan Engelhardt
2009-10-01 15:55 ` Joe Perches
2009-09-30 22:37 ` [PATCH 2/2] net/netfilter: use pr_<level> consistently Joe Perches
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=1254358235.2960.145.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@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).