[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE4R7bAvYkfKWzoDy89uvRebWPgwZE6zYgPt8+tvoJ3jE6CsUA@mail.gmail.com>
Date: Thu, 26 Feb 2015 06:04:51 -0800
From: Scott Feldman <sfeldma@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"jiri@...nulli.us" <jiri@...nulli.us>
Subject: Re: [PATCH net-next 1/3] rocker: fix non-portable err return codes
On Thu, Feb 26, 2015 at 4:17 AM, David Laight <David.Laight@...lab.com> wrote:
> From: sfeldma@...il.com
>> The rocker device returns error codes if something goes wrong with descriptor
>> processing. Originally the device used standard errno codes for different
>> errors, but since those errno codes aren't portable across ARCHs, the device
>> now returns hard-coded error codes that stay constant across diff ARCHs. Fix
>> driver to use those same hard-coded values.
>
> You might as well use dense error numbers and then an array for the conversion.
> If you want to avoid confusion, then offset the error numbers from zero.
Agreed, but I was stuck by the legacy of older devices which used the
original errno values. My bad not thinking about errno's being
non-portable.
-scott
--
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