linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] OMAP2+: IOMMU: change OMAP2+ error message to dev_dbg()
Date: Tue, 15 Feb 2011 14:44:57 +0000	[thread overview]
Message-ID: <20110215144457.GD11199@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTin++DGAGT9-nahy1Qm7ASbGm=JjNuPZWZ6XUbcX@mail.gmail.com>

On Tue, Feb 15, 2011 at 04:36:26PM +0200, David Cohen wrote:
> But pr_cont() would be wrong in case of DEBUG isn't set, isn't it?

Yes.  One other solution you could do is:

	char buf[80], *p = buf;

	buf[0] = '\0';
	for (i = 0; i < ARRAY_SIZE(err_msg); i++)
		if (stat & (1 << i))
			p += scnprintf(p, sizeof(buf) - (p - buf),
					" %s", err_msg[i]);

	dev_dbg(obj->dev, "%s: da:%08x%s\n", __func__, da, buf);

which means that you're then printing the entire string in one go -
and there's no chance for another message to come in the middle of it.

Note that I've placed the ' ' at the beginning of the format string so
that we don't end up with useless trailing space in messages.  Minor
point but it's easy to do here.

  reply	other threads:[~2011-02-15 14:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15 13:20 [PATCH 0/2] IOMMU fault callback support David Cohen
2011-02-15 13:20 ` [PATCH 1/2] OMAP2+: IOMMU: change OMAP2+ error message to dev_dbg() David Cohen
2011-02-15 13:38   ` Sergei Shtylyov
2011-02-15 13:44     ` David Cohen
2011-02-15 13:56       ` Sergei Shtylyov
2011-02-15 14:01         ` David Cohen
2011-02-15 13:59       ` Jarkko Nikula
2011-02-15 14:08         ` David Cohen
2011-02-15 14:21           ` David Cohen
2011-02-15 14:30           ` Jarkko Nikula
2011-02-15 14:29     ` Russell King - ARM Linux
2011-02-15 14:36       ` David Cohen
2011-02-15 14:44         ` Russell King - ARM Linux [this message]
2011-02-15 14:50           ` David Cohen
2011-02-15 15:51             ` Russell King - ARM Linux
2011-02-15 13:20 ` [PATCH 2/2] OMAP: IOMMU: add support to callback during fault handling David Cohen
2011-02-15 13:32 ` [PATCH 0/2] IOMMU fault callback support David Cohen

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=20110215144457.GD11199@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@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).