lkml.org 
[lkml]   [2010]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/5]acpi:glue.c Fix warning: variable 'ret' set but not used
Date
Justin P. Mattock <justinmattock@gmail.com> wrote:

> + if (ret) {
> + printk(KERN_WARNING "dev%d: Failed to get exception\n", ret);
> + }

That's not a good warning because it's a meaningless string and you're passing
the error number to the dev%d.

Better would perhaps be:

"dev%d: Failed to create physical_node sysfs link: %d\n"

Note also that you're only checking the result of one sysfs_create_link().
You should probably check both.

Also you're introducing a pair of unnecessary braces as there's only one
statement in the if-body.

David


\
 
 \ /
  Last update: 2010-06-28 14:51    [W:0.110 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site