[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfFPiWM8LRwmXU-jugouBWStTnQBqU=FyyPP2s9dnY97g@mail.gmail.com>
Date: Sun, 13 May 2018 00:30:51 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Guenter Roeck <linux@...ck-us.net>,
Hans de Goede <hdegoede@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jun Li <jun.li@....com>,
Mats Karrman <mats.dev.list@...il.com>,
USB <linux-usb@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v3 5/5] usb: typec: tcpm: Support for Alternate Modes
On Fri, May 11, 2018 at 4:18 PM, Heikki Krogerus
<heikki.krogerus@...ux.intel.com> wrote:
> This adds more complete handling of VDMs and registration of
> partner alternate modes, and introduces callbacks for
> alternate mode operations.
>
> Only DFP role is supported for now.
> + for (i = 0; i < cnt; i++)
> + p[i] = le32_to_cpu(payload[i]);
I would recommend to consider to use le32_to_cpu_array().
Though, actually we have slightly different API for BE and LE cases.
For LE existing would be renamed to rather le32_to_cpus_array() and
establishing the former one in the similar way how be32_to_cpu_array()
is implemented.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists