All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Travis <travis@sgi.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Chris Wright <chrisw@sous-sol.org>, Daniel Rahn <drahn@suse.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Jack Steiner <steiner@sgi.com>, Tony Ernst <tee@sgi.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] x86, pci: Increase the number of iommus supported to be MAX_IO_APICS v2
Date: Mon, 27 Feb 2012 08:57:41 +0100	[thread overview]
Message-ID: <20120227075741.GD3397@elte.hu> (raw)
In-Reply-To: <20120223123011.cfe4ae35.akpm@linux-foundation.org>


* Andrew Morton <akpm@linux-foundation.org> wrote:

> Also we can tweak the code flow and the message to avoid dorky
> 80-column games:

> +		printk_once(KERN_ERR "intel-iommu: exceeded %d IOMMUs\n",
>  			  IOMMU_UNITS_SUPPORTED);

Not to mention the use of pr_err():

		pr_err("intel-iommu: exceeded %d IOMMUs\n", IOMMU_UNITS_SUPPORTED);

Plus if we defined a proper driver message prefix at the top of 
the driver:

 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

We could do:

		pr_err("Exceeded max %d IOMMUs\n", IOMMU_UNITS_SUPPORTED);

Note, I added 'max', for clarity.

Plus IOMMU_UNITS_SUPPORTED could be renamed to the much shorter 
IOMMU_MAX, without a loss of clarity:

		pr_err("Exceeded max %d IOMMUs\n", IOMMU_MAX);

So we made that line vastly shorter, and made the human-readable 
message actually longer and more expressive.

80 column wraps are almost always not a sign of lack of screen 
real estate, but a symptom of lack of thinking.

Thanks,

	Ingo

  reply	other threads:[~2012-02-27  7:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23  0:49 [PATCH 0/2] Updates for SGI UV1/UV2 systems Mike Travis
2012-02-23  0:49 ` [PATCH 1/2] x86 PCI: Fix identity mapping for sandy bridge Mike Travis
2012-02-23  0:49 ` [PATCH 2/2] x86, pci: Increase the number of iommus supported to be MAX_IO_APICS v2 Mike Travis
2012-02-23 20:30   ` Andrew Morton
2012-02-27  7:57     ` Ingo Molnar [this message]
2012-02-27  8:03       ` Andrew Morton
2012-02-27  9:15         ` Ingo Molnar

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=20120227075741.GD3397@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=drahn@suse.com \
    --cc=dwmw2@infradead.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steiner@sgi.com \
    --cc=tee@sgi.com \
    --cc=travis@sgi.com \
    --cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.