Re: [PATCH v2 1/7] usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits()

From: Linus Walleij
Date: Thu Mar 25 2021 - 05:21:33 EST


On Tue, Mar 23, 2021 at 4:36 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> Either way ~0 will be in the correct byte order, hence
> replace cpu_to_le32() by lower_32_bits(). Moreover,
> it makes sparse happy, otherwise it complains:
>
> .../pch_udc.c:1813:27: warning: incorrect type in assignment (different base types)
> .../pch_udc.c:1813:27: expected unsigned int [usertype] dataptr
> .../pch_udc.c:1813:27: got restricted __le32 [usertype]
>
> Fixes: f646cf94520e ("USB device driver of Topcliff PCH")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Nice fix! Also easier to understand.
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij