Re: [PATCH 2/2] x86, pci: Increase the number of iommus supported tobe MAX_IO_APICS v2

From: Ingo Molnar
Date: Mon Feb 27 2012 - 02:57:58 EST



* Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/