All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, Yunke Cao <yunkec@chromium.org>,
	Max Staudt <mstaudt@chromium.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] media: uvcvideo: Refactor streamon/streamoff
Date: Tue, 6 Dec 2022 11:12:46 +0900	[thread overview]
Message-ID: <Y46lHvHCFHH8J/ao@google.com> (raw)
In-Reply-To: <20220920-resend-powersave-v4-1-47484ae40761@chromium.org>

On (22/12/02 18:19), Ricardo Ribalda wrote:
> @@ -840,13 +840,19 @@ static int uvc_ioctl_streamon(struct file *file, void *fh,
[..]
> +	handle->is_streaming = !ret;


> @@ -857,15 +863,22 @@ static int uvc_ioctl_streamoff(struct file *file, void *fh,
[..]
> +	handle->is_streaming = !!ret;

Had uvc_ioctl_streamABC() be 3 functions we would have seen

	handle->is_streaming = !!!ret;

:)


[..]

A nit:

>  struct uvc_fh {
>  	struct v4l2_fh vfh;
> +	bool is_streaming;

That's a lot of padding.

>  	struct uvc_video_chain *chain;
>  	struct uvc_streaming *stream;
>  	enum uvc_handle_state state;

I guess is_streaming better be next to enum uvc_handle_state, in which
case is_streaming should not change sizeof(uvc_fh) (at least so on
64-bit).

  reply	other threads:[~2022-12-06  2:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 17:19 [PATCH v4 0/2] media: uvcvideo: Implement granular power management Ricardo Ribalda
2022-12-02 17:19 ` [PATCH v4 1/2] media: uvcvideo: Refactor streamon/streamoff Ricardo Ribalda
2022-12-06  2:12   ` Sergey Senozhatsky [this message]
2022-12-02 17:19 ` [PATCH v4 2/2] media: uvcvideo: Do power management granularly Ricardo Ribalda
2022-12-06  1:51   ` Sergey Senozhatsky

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=Y46lHvHCFHH8J/ao@google.com \
    --to=senozhatsky@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mchehab@kernel.org \
    --cc=mstaudt@chromium.org \
    --cc=ribalda@chromium.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tfiga@chromium.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 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.