Re: [PATCH v2] olpc_battery: Fix endian neutral breakage for s16values

From: Anton Vorontsov
Date: Tue Sep 28 2010 - 07:16:20 EST


On Mon, Sep 27, 2010 at 10:51:35AM -0400, Richard A. Smith wrote:
> On 09/25/2010 02:19 PM, Daniel Drake wrote:
> >From: Richard A. Smith<richard@xxxxxxxxxx>
> >
> >When the driver was updated to be endian neutral (8e9c7716c)
> >the signed part of the s16 values was lost. This is because be16_to_cpu()
> >returns a signed value. This patch casts the values back to a s16 number
> >prior to the the implicit cast up to an int.
>
> Seems the comment has a error. Should be 'returns an unsigned'
> rather than signed. Other than that it looks good.

Fixed and applied w/ Cc: <stable@xxxxxxxxxx>, thanks!

--
Anton Vorontsov
email: cbouatmailru@xxxxxxxxx
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/