lkml.org 
[lkml]   [2016]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 3/4] usb: typec: USB Type-C Port Manager (tcpm)
On Wed, Aug 3, 2016 at 2:28 AM, Oliver Neukum <oneukum@suse.com> wrote:
> On Tue, 2016-08-02 at 13:32 -0700, Guenter Roeck wrote:
>> +static bool svdm_consume_svids(struct tcpm_port *port, const u32
>> *payload,
>> + int cnt)
>> +{
>> + struct pd_mode_data *pmdata = &port->mode_data;
>> + int i;
>> +
>> + for (i = 1; i < cnt; i++) {
>> + u16 svid;
>> +
>> + svid = (payload[i] >> 16) & 0xffff;
>> + if (!svid)
>> + return false;
>
> Hi,
>
> this looks like an endianness bug.
>

Yes, you are right, and there are lots of those in my code. Thanks for
bringing it up.

Guenter

\
 
 \ /
  Last update: 2016-08-03 21:21    [W:0.046 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site