From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Max Staudt <mstaudt@google.com>, Yunke Cao <yunkec@chromium.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, stable@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] media: uvcvideo: Do not alloc dev->status
Date: Wed, 14 Dec 2022 15:02:20 +0900 [thread overview]
Message-ID: <Y5lm7EgpelHbZa8J@google.com> (raw)
In-Reply-To: <CANiDSCs4onzD-OBYubJpGfyfPGcpMEPfPT8OKd_Q3UtNN1XciA@mail.gmail.com>
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?
prev parent reply other threads:[~2022-12-14 6:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 14:35 [PATCH v2 0/2] uvc: Fix race condition on uvc Ricardo Ribalda
2022-12-13 14:35 ` [PATCH v2 1/2] media: uvcvideo: Fix race condition with usb_kill_urb Ricardo Ribalda
2022-12-14 4:04 ` Yunke Cao
2022-12-13 14:35 ` [PATCH v2 2/2] media: uvcvideo: Do not alloc dev->status Ricardo Ribalda
2022-12-14 0:39 ` Sergey Senozhatsky
2022-12-14 5:57 ` Ricardo Ribalda
2022-12-14 6:02 ` Sergey Senozhatsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5lm7EgpelHbZa8J@google.com \
--to=senozhatsky@chromium.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mstaudt@google.com \
--cc=ribalda@chromium.org \
--cc=stable@vger.kernel.org \
--cc=yunkec@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox