lkml.org 
[lkml]   [2017]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] staging: typec: Fix sparse warnings about incorrect types
On 10 May 2017 at 08:23, Guenter Roeck <groeck@google.com> wrote:

> Please the patch into two parts, one per file; the required changes
> for endianness support in tcpci.c are much more complex.

I will send out a patch for the two simple fixes - the use of
pd_header_cnt_le().

> Excellent catch, but the fix is wrong. We don't want to change the
> endianness here, since the data is sent to the chip. This will require
> a (much) more comprehensive fix - header should probably be le16, the
> second parameter to tcpci_write16() needs to be le16, plus everything
> that comes with it (currently the code is just not endianness clean).
> tcpci_read16() is also incorrect and has the same problem (it is
> really a bad idea to read 16 bit into an unsigned int pointer).
>
> Let me know if you want to try to fix this; otherwise I'll do it.

Sure, I'd like to give this a try. I will take a closer look at the
code and get back to you with questions.

\
 
 \ /
  Last update: 2017-05-10 21:22    [W:0.038 / U:31.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site