Re: [PATCH] USB: gadget: dummy_hcd: switch char * to u8 *

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

 



On Tue, Mar 26, 2024 at 09:16:12AM -0700, Linus Torvalds wrote:
> On Tue, 26 Mar 2024 at 09:03, Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > The function handle_control_request() casts the urb buffer to a char *,
> > and then treats it like a unsigned char buffer when assigning data to
> > it.  On some architectures, "char" is really signed, so let's just
> > properly set this pointer to a u8 to take away any potential problems as
> > that's what is really wanted here.
> [..]
> > Reported-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> 
> Well, I assume this goes back to the discussions almost two years ago
> that then just led us to use '-funsigned-char' for the kernel.

Yes.

> So the patch is still correct, but it's not like it's strictly
> necessary. I have no idea how this re-surfaced now.

It was in my really old patch queue and I noticed it had never been
updated or merged, so I dug it up and fixed it based on Alan's review.

thanks,

greg k-h




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux