Re: [PATCH v2 10/23] HID: uclogic: Support v2 protocol

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

 



On 2/21/19 12:41 PM, Benjamin Tissoires wrote:
On Sun, Feb 10, 2019 at 11:15 AM Nikolai Kondrashov <spbnick@xxxxxxxxx> wrote:
+/**
+ * uclogic_params_get_le24() - get a 24-bit little-endian number from a
+ * buffer.
+ *
+ * @p: The pointer to the number buffer.
+ *
+ * Returns:
+ *     The retrieved number
+ */
+static s32 uclogic_params_get_le24(const void *p)
+{
+       const __u8 *b = p;
+       return b[0] | (b[1] << 8UL) | (b[2] << 16UL);

Nitpick, I am pretty sure we already have the bits in the kernel for that.

I tried to find it and couldn't, do you have any hints where I can find it?

But OTOH, not sure I'll request a v3 just for that.

Will be glad to fix this, if you'll need v3, or later.

Nick



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux