From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Yunke Cao <yunkec@chromium.org>, Ming Lei <tom.leiming@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Max Staudt <mstaudt@google.com>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [PATCH v2] media: uvcvideo: Do not alloc dev->status
Date: Thu, 15 Dec 2022 10:14:53 +0900 [thread overview]
Message-ID: <Y5p1DVWXuYSzkRO4@google.com> (raw)
In-Reply-To: <20221214-uvc-status-alloc-v2-0-3f1cba6fc734@chromium.org>
On (22/12/14 14:37), Ricardo Ribalda wrote:
[..]
> +struct uvc_status_streaming {
> + u8 button;
> +} __packed;
> +
> +struct uvc_status_control {
> + u8 bSelector;
> + u8 bAttribute;
> + u8 bValue[11];
> +} __packed;
> +
> +struct uvc_status {
> + u8 bStatusType;
> + u8 bOriginator;
> + u8 bEvent;
> + union {
> + struct uvc_status_control control;
> + struct uvc_status_streaming streaming;
> + };
> +} __packed;
> +
> struct uvc_device {
> struct usb_device *udev;
> struct usb_interface *intf;
> @@ -559,7 +579,7 @@ struct uvc_device {
> /* Status Interrupt Endpoint */
> struct usb_host_endpoint *int_ep;
> struct urb *int_urb;
> - u8 *status;
> +
> struct input_dev *input;
> char input_phys[64];
>
> @@ -572,6 +592,12 @@ struct uvc_device {
> } async_ctrl;
>
> struct uvc_entity *gpio_unit;
> +
> + /*
> + * Ensure that status is aligned, making it safe to use with
> + * non-coherent DMA.
> + */
> + struct uvc_status status __aligned(ARCH_KMALLOC_MINALIGN);
____cacheline_aligned ?
I don't see anyone using ARCH_KMALLOC_MINALIGN except for slab.h
next prev parent reply other threads:[~2022-12-15 1:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 13:37 [PATCH v2] media: uvcvideo: Do not alloc dev->status Ricardo Ribalda
2022-12-15 1:14 ` Sergey Senozhatsky [this message]
2022-12-15 7:59 ` Ricardo Ribalda
2022-12-15 9:08 ` Laurent Pinchart
2022-12-15 9:11 ` Laurent Pinchart
2022-12-15 11:45 ` Jonathan Cameron
2022-12-20 22:59 ` Ricardo Ribalda
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=Y5p1DVWXuYSzkRO4@google.com \
--to=senozhatsky@chromium.org \
--cc=Jonathan.Cameron@huawei.com \
--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=tom.leiming@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.