[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C28E14D.5050701@gmail.com>
Date: Mon, 28 Jun 2010 10:52:13 -0700
From: "Justin P. Mattock" <justinmattock@...il.com>
To: David Howells <dhowells@...hat.com>
CC: linux-kernel@...r.kernel.org, sds@...ho.nsa.gov, lenb@...nel.org,
linux-bluetooth@...r.kernel.org
Subject: Re: [PATCH 3/5]acpi:glue.c Fix warning: variable 'ret' set but not
used
On 06/28/2010 05:48 AM, David Howells wrote:
> Justin P. Mattock<justinmattock@...il.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"
>
I'll throw that in.
> Note also that you're only checking the result of one sysfs_create_link().
> You should probably check both.
>
this is where I get confused with: &acpi_dev->dev.kobj, &dev->kobji
it's like a criss cross of code
> Also you're introducing a pair of unnecessary braces as there's only one
> statement in the if-body.
>
> David
>
would just removing ret be good or will things go out of whack because
of no ret
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