Messages in this thread | | | From | Linus Torvalds <> | Date | Sun, 23 Oct 2022 09:46:18 -0700 | Subject | Re: [PATCH] USB: gadget: dummy_hcd: switch char * to u8 * |
| |
On Sun, Oct 23, 2022 at 9:04 AM Greg Kroah-Hartman <gregkh@linuxfoundation.org> 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
| |