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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 Jun 2010 10:14:41 -0700
From:	"Justin P. Mattock" <justinmattock@...il.com>
To:	David Howells <dhowells@...hat.com>
CC:	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
	lenb@...nel.org
Subject: Re: [PATCH 3/5]acpi:glue.c Fix warning: variable 'ret' set but not
 used

On 06/29/2010 08:47 AM, David Howells wrote:
> Justin P. Mattock<justinmattock@...il.com>  wrote:
>
>> +	if (fn) {
>> + 			printk(KERN_WARNING "dev%d: Failed to create
>> firmware_node: %d\n", status, fn);
>> +	}else if (pn) {
>> +			printk(KERN_WARNING "dev%d: Failed to create
>> physical_node: %d\n", status, pn);
>> + 			return 0;
>> +		}
>
> The if-statement should be correctly indented (it's inside another
> if-body, so needs to be one more tab over) and there needs to be a space
> before the else.
>
o.k., so it should look something like this:
if (fn) {
	code...
	} else if (pn) {


> You should probably split your printks up so they don't exceed 80 chars too,
> for example:
>
> 			printk(KERN_WARNING
> 			       "dev%d: Failed to create physical_node: %d\n",
> 			       status, pn);
>
> Also 'status' is probably the wrong thing to print as the number in "dev%d".
> If it worked, that should be unconditionally AE_OK, I think.  Can you not use
> dev_warn() or similar instead or printk?
>
> David
>

alright, I'll look at this today. I'm not the best at making printks in 
fact I'm more intimidated by them..(so with this in mind, I'm going to 
sit and make myself learn this, so I atleast have a better idea of doing 
these than I have now.)

Justin P. Mattock








--
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