[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whLgudbtXKbnTzGnqP7E2rY=BNSWayMbcZmPUHr3j8y5A@mail.gmail.com>
Date: Sun, 23 Oct 2022 09:46:18 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Alan Stern <stern@...land.harvard.edu>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, Felipe Balbi <balbi@...nel.org>,
Jakob Koschel <jakobkoschel@...il.com>,
Randy Dunlap <rdunlap@...radead.org>,
Ira Weiny <ira.weiny@...el.com>
Subject: Re: [PATCH] USB: gadget: dummy_hcd: switch char * to u8 *
On Sun, Oct 23, 2022 at 9:04 AM Greg Kroah-Hartman
<gregkh@...uxfoundation.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
Powered by blists - more mailing lists