Re: [PATCH] staging: typec: Fix sparse warnings about incorrect types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 10, 2017 at 10:15 AM, Guru Das S <gurooodas@xxxxxxxxx> wrote:
> On 10 May 2017 at 08:23, Guenter Roeck <groeck@xxxxxxxxxx> 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.

Thanks!
Guenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux