[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y5lm7EgpelHbZa8J@google.com>
Date: Wed, 14 Dec 2022 15:02:20 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Max Staudt <mstaudt@...gle.com>,
Yunke Cao <yunkec@...omium.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, stable@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] media: uvcvideo: Do not alloc dev->status
On (22/12/14 06:57), Ricardo Ribalda wrote:
> > On (22/12/13 15:35), Ricardo Ribalda wrote:
> > [..]
> > > +++ b/drivers/media/usb/uvc/uvcvideo.h
> > > @@ -559,7 +559,7 @@ struct uvc_device {
> > > /* Status Interrupt Endpoint */
> > > struct usb_host_endpoint *int_ep;
> > > struct urb *int_urb;
> > > - u8 *status;
> > > + u8 status[UVC_MAX_STATUS_SIZE];
> >
> > Can we use `struct uvc_control_status status;` instead of open-coding it?
> > Seems that this is what the code wants anyway:
>
> It can also be a `struct uvc_streaming_status`
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/usb/uvc/uvc_status.c#n230
>
> so we always need the casting :(
Then perhaps we can put both of them into anon union in struct uvc_device
as stream_status and control_status?
Powered by blists - more mailing lists