public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
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

  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$(echo .)sony.com \
    --cc=arnd@arndb$(echo .)de \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox