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