Re: [PATCH] USB: gadget: dummy_hcd: switch char * to u8 *
From: Linus Torvalds
Date: Sun Oct 23 2022 - 12:46:43 EST
On Sun, Oct 23, 2022 at 9:04 AM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Along these lines, do we really not have a predefined macro/inline
> function that does:
> (value >> 8)
> to give you the "high byte" of a 16bit value?
No macros like that. And honestly, why would you want a macro that is
more complicated than the operation itself?
But it sounds like what you actually want is just
put_unaligned_le16(dum->devstatus, buf);
which does both bytes correctly (and turns into a plain 16-bit store
on sane architectures)..
Linus