From: Geoff Levand <geoffrey.levand@am.sony.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [patch 2/3] PS3: Add logical performance monitor device support
Date: Sun, 06 Jan 2008 12:39:48 -0800 [thread overview]
Message-ID: <47813C94.10505@am.sony.com> (raw)
In-Reply-To: <200801051229.33099.arnd@arndb.de>
On 01/05/2008 03:29 AM, Arnd Bergmann wrote:
> On Saturday 05 January 2008, Geoff Levand wrote:
>> + struct layout {
>> + struct ps3_system_bus_device dev;
>> + } *p;
>
> What's the point of this data structure? You don't use the
> struct anywhere, and it only has one member, so you could
> just declare that directly.
Yes, this code was just cut and pasted from a device that
had more members.
>> + if (tmp1 != tmp2) {
>> + pr_debug("%s:%d: wrong lpar\n",
>> + __func__, __LINE__);
>> + result = -1;
>> + goto fail_rights;
>> + }
>> +
>> + if (!(p->dev.lpm.rights & PS3_LPM_RIGHTS_USE_LPM)) {
>> + pr_debug("%s:%d: don't have rights to use lpm\n",
>> + __func__, __LINE__);
>> + result = -1;
>> + goto fail_rights;
>> + }
>> +
>
> I think __init functions should return error codes like -EPERM or
> -EINVAL, not numeric -1.
I'll fix it in the next post.
-Geoff
next prev parent reply other threads:[~2008-01-06 20:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080105003019.595703814@am.sony.com>
2008-01-05 3:12 ` [patch 1/3] PS3: Add logical performance monitor repository routines Geoff Levand
2008-01-05 3:12 ` [patch 2/3] PS3: Add logical performance monitor device support Geoff Levand
2008-01-05 11:29 ` Arnd Bergmann
2008-01-06 20:39 ` Geoff Levand [this message]
2008-01-05 3:30 ` [patch 3/3] PS3: Add logical performance monitor driver support Geoff Levand
2008-01-05 11:56 ` Arnd Bergmann
2008-01-06 20:40 ` Geoff Levand
2008-01-06 21:56 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47813C94.10505@am.sony.com \
--to=geoffrey.levand@am.sony.com \
--cc=arnd@arndb.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.