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: <20120121155235.GN3294@mwanda>
Date:	Sat, 21 Jan 2012 18:52:35 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Sam Hansen <solid.se7en@...il.com>
Cc:	Arnaud Patard <arnaud.patard@...-net.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Aaro Koskinen <aaro.koskinen@....fi>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] xgifb: checkpatch cleanup, printk() KERN_*

On Sat, Jan 21, 2012 at 02:10:12AM -0800, Sam Hansen wrote:
>  	if (reg1 != 0xa1) { /*I/O error */
> -		printk("\nXGIfb: I/O error!!!");
> +		printk(KERN_ERR "\nXGIfb: I/O error!!!");

It doesn't make sense to do this.  KERN_ERR puts a "<3>" in front of
the line so we know how important it is, but it's a blank line
because of the "\n" at the start.

Also the should probably be using pr_err() or dev_err().

> -	printk("XGIfb: XGIInitNew() ...");
> +	printk(KERN_INFO "XGIfb: XGIInitNew() ...");
>  	pci_set_drvdata(pdev, xgifb_info);
>  	if (XGIInitNew(pdev))
> -		printk("OK\n");
> +		printk(KERN_INFO "OK\n");
>  	else
> -		printk("Fail\n");
> +		printk(KERN_ERR "Fail\n");

These put a "<3>" in the middle of the line which doesn't help
anyone.  Rewrite it so it's on one line.  Get rid of the OK line.

>  	if (pVBInfo->FBAddr == NULL) {
> -		printk("\n pVBInfo->FBAddr == 0 ");
> +		printk(KERN_INFO "\n pVBInfo->FBAddr == 0 ");

Same.

regards,
dan carpenter

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ