Messages in this thread | | | Date | Mon, 27 Feb 2012 08:57:41 +0100 | From | Ingo Molnar <> | Subject | Re: [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
| |