lkml.org 
[lkml]   [2012]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] x86, pci: Increase the number of iommus supported to be MAX_IO_APICS v2

* 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


\
 
 \ /
  Last update: 2012-02-27 09:01    [W:0.039 / U:0.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site