[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7318E17E-C9F9-42CE-89A4-E3DBAF0A02C6@freescale.com>
Date: Wed, 18 Jul 2007 13:52:52 -0500
From: Andy Fleming <afleming@...escale.com>
To: pradeep singh <pradeep.rautela@...il.com>
Cc: netdev@...r.kernel.org, linuxppc-dev@...abs.org
Subject: Re: [PATCH 1/2] Fix error checking in Vitesse IRQ config
On Jul 18, 2007, at 02:00, pradeep singh wrote:
> On 7/18/07, Andy Fleming <afleming@...escale.com> wrote:
>> - if (err)
>> + if (err < 0)
>> return err;
>
> but would that mean, if phy_read returns > 0 it is a success?
Yes. phy_read() returns a 32-bit value. If there's an error, it
returns a negative number. If not, it returns whatever was in the
register (which is only 16 bits)
phy_write() returns 0 on success, and non-zero, otherwise. In
hindsight, it would have been better to be consistent.
Andy
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists