lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120227075741.GD3397@elte.hu>
Date:	Mon, 27 Feb 2012 08:57:41 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Mike Travis <travis@....com>,
	David Woodhouse <dwmw2@...radead.org>,
	Chris Wright <chrisw@...s-sol.org>,
	Daniel Rahn <drahn@...e.com>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Jack Steiner <steiner@....com>, Tony Ernst <tee@....com>,
	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] x86, pci: Increase the number of iommus supported to
 be MAX_IO_APICS v2


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ