Re: [PATCH 2/2] x86, pci: Increase the number of iommus supported to
be MAX_IO_APICS v2
[Posted February 29, 2012 by corbet]
| From: |
| Ingo Molnar <mingo-AT-elte.hu> |
| To: |
| Andrew Morton <akpm-AT-linux-foundation.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 |
| Message-ID: |
| <20120227075741.GD3397@elte.hu> |
| Cc: |
| Mike Travis <travis-AT-sgi.com>,
David Woodhouse <dwmw2-AT-infradead.org>,
Chris Wright <chrisw-AT-sous-sol.org>,
Daniel Rahn <drahn-AT-suse.com>,
Jesse Barnes <jbarnes-AT-virtuousgeek.org>,
Jack Steiner <steiner-AT-sgi.com>, Tony Ernst <tee-AT-sgi.com>,
x86-AT-kernel.org, linux-kernel-AT-vger.kernel.org |
| Archive-link: |
| Article, Thread
|
* 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
(
Log in to post comments)