From: Linus Torvalds <torvalds@linux-foundation.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] Add PR_PREFIX to pr_xyz macros.
Date: Wed, 12 Nov 2008 11:48:24 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.2.00.0811121144400.3468@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1226511327.23498.3.camel@localhost>
On Wed, 12 Nov 2008, Martin Schwidefsky wrote:
>
> +#ifndef PR_PREFIX
> +#define pr_fmt(format) format
> +#else
> +#define pr_fmt(format) PR_PREFIX ": " format
> +#endif
> +
> +#define pr_emerg(fmt, ...) \
> + printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
So, why can't people just define their pr_fmt() macro directly, something
like
#define pr_fmt(fmt) \
"%s:%d " fmt, __FILE__, __LINE__
which seems to be much more useful and generic than forcing them to use
"PR_PREFIX"?
Linus
next prev parent reply other threads:[~2008-11-12 19:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 17:35 Martin Schwidefsky
2008-11-12 19:48 ` Linus Torvalds [this message]
2008-11-12 19:59 ` Martin Schwidefsky
2008-11-12 20:16 ` Martin Schwidefsky
2008-11-14 21:32 ` Andrew Morton
2008-11-15 8:58 ` 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=alpine.LFD.2.00.0811121144400.3468@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome