Re: [PATCH v2 3/3] usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.

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

 



Andy Shevchenko <andy.shevchenko@xxxxxxxxx> writes:

> On Thu, Jul 26, 2018 at 5:01 PM, Gevorg Sahakyan
> <Gevorg.Sahakyan@xxxxxxxxxxxx> wrote:
>> Declared dwc2_check_core_endianness() function for dynamicly check
>> core endianness.
>> Added needs_byte_swap flag to hsotg structure, and depending on
>> flag swap value inside dwc2_readl/writel functions.
>
>> +#define swap32(x) (\
>> +       {typeof(x) x_ = (x); \
>> +       (((u32)(x_) << 24) & (u32)0xFF000000) | \
>> +       (((u32)(x_) <<  8) & (u32)0x00FF0000) | \
>> +       (((u32)(x_) >>  8) & (u32)0x0000FF00) | \
>> +       (((u32)(x_) >> 24) & (u32)0x000000FF); })
>
> What's wrong with swab32() ?

indeed. That's a reimplementation of swab32. Gevorg, care to fix this? I
have pushed patches 1 and 2.

BTW, make sure to send series as a series of patches where patches 2+
come as replies to patch 1. Your series are not showing up as threads.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux