From: Igor Grinberg <grinberg@compulab.co.il>
To: Brian Norris <computersforpeace@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org, dedekind1@gmail.com
Subject: Re: [PATCH 1/2] mtd: nand: generalized error messages with __func__
Date: Tue, 07 Jun 2011 10:26:27 +0300 [thread overview]
Message-ID: <4DEDD2A3.8030408@compulab.co.il> (raw)
In-Reply-To: <BANLkTi=BYeQ+cBMpRodDDY_KapjEoHVA+A@mail.gmail.com>
On 06/01/11 21:37, Brian Norris wrote:
> On Wed, Jun 1, 2011 at 3:30 AM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>> or should we define our own pr_fmt in include/linux/mtd.h?
>> Yes, before you include files.
> Well, I've tried this, and as I suspected, I can't just include it in
> mtd.h at the top, since we can't guarantee that <linux/mtd/mtd.h> is
> going to be the first included header in other files. Specifically, in
> include/linux/mtd/nand.h, we include other headers before mtd.h and so
> printk.h has already defined pr_fmt() for us, so this doesn't work.
> I'm not sure if there's a nice place to define pr_fmt() right now...
You should not define pr_fmt() in .h file.
pr_fmt() should be defined in _.c_ file at the top - _before any include is done_.
And yes, like Artem already said, _only_ in those _.c_ files where we want to use it.
--
Regards,
Igor.
next prev parent reply other threads:[~2011-06-07 7:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 21:59 [PATCH 1/2] mtd: nand: generalized error messages with __func__ Brian Norris
2011-05-25 21:59 ` [PATCH 2/2] mtd: nand: multi-line comment style fixups Brian Norris
2011-06-06 14:26 ` Artem Bityutskiy
2011-06-06 15:21 ` Brian Norris
2011-05-26 5:14 ` [PATCH 1/2] mtd: nand: generalized error messages with __func__ Igor Grinberg
2011-05-26 5:16 ` Artem Bityutskiy
2011-05-31 18:52 ` Brian Norris
2011-05-31 20:19 ` Mike Frysinger
2011-06-01 10:30 ` Artem Bityutskiy
2011-06-01 18:37 ` Brian Norris
2011-06-03 15:35 ` Artem Bityutskiy
2011-06-07 7:26 ` Igor Grinberg [this message]
2011-06-07 22:57 ` Brian Norris
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=4DEDD2A3.8030408@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.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).