From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Jonathan Sims <jonathan.625266@earthlink.net>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
mchehab@kernel.org, kpyle@austin.rr.com, ryleyjangus@gmail.com
Subject: Re: [PATCH 1/1] hdpvr: code cleanup
Date: Mon, 6 Mar 2017 08:14:24 -0300 [thread overview]
Message-ID: <20170306081424.59bc59c0@vento.lan> (raw)
In-Reply-To: <20170214201832.7a418b5a@earthlink.net>
Em Tue, 14 Feb 2017 20:18:32 -0500
Jonathan Sims <jonathan.625266@earthlink.net> escreveu:
> This is a code cleanup after recent changes introduced by commit a503ff812430e104f591287b512aa4e3a83f20b1.
Patch doesn't apply:
patch -p1 -i patches/lmml_39419_1_1_hdpvr_code_cleanup.patch --dry-run -t -N
checking file drivers/media/usb/hdpvr/hdpvr-video.c
patch: **** malformed patch at line 35: __user *buffer, size_t count, goto err;
Patch may be line wrapped
checking file drivers/media/usb/hdpvr/hdpvr-video.c
patch: **** unexpected end of file in patch
Your e-mailer is breaking long lines, causing it to not work.
Please either configure your e-mailer to not wrap long lines or
use git to send it.
>
> Signed-off-by: Jonathan Sims <jonathan.625266@earthlink.net>
> ---
>
> drivers/media/usb/hdpvr/hdpvr-video.c | 18 +++++++-----------
> 1 file changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
> index 7fb036d6a86e..b2ce5c0807fb 100644
> --- a/drivers/media/usb/hdpvr/hdpvr-video.c
> +++ b/drivers/media/usb/hdpvr/hdpvr-video.c
> @@ -449,7 +449,7 @@ static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count,
>
> if (buf->status != BUFSTAT_READY &&
> dev->status != STATUS_DISCONNECTED) {
> - int err;
> +
> /* return nonblocking */
> if (file->f_flags & O_NONBLOCK) {
> if (!ret)
> @@ -457,23 +457,19 @@ static ssize_t hdpvr_read(struct file *file, char
> __user *buffer, size_t count, goto err;
> }
>
> - err =
> wait_event_interruptible_timeout(dev->wait_data,
> + ret =
> wait_event_interruptible_timeout(dev->wait_data, buf->status ==
> BUFSTAT_READY, msecs_to_jiffies(1000));
> - if (err < 0) {
> - ret = err;
> + if (ret < 0)
> goto err;
> - }
> - if (!err) {
> + if (!ret) {
> v4l2_dbg(MSG_INFO, hdpvr_debug,
> &dev->v4l2_dev, "timeout: restart streaming\n");
> hdpvr_stop_streaming(dev);
> - msecs_to_jiffies(4000);
> - err = hdpvr_start_streaming(dev);
> - if (err) {
> - ret = err;
> + msleep(4000);
> + ret = hdpvr_start_streaming(dev);
> + if (ret)
> goto err;
> - }
> }
> }
>
Thanks,
Mauro
prev parent reply other threads:[~2017-03-06 11:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 1:18 [PATCH 1/1] hdpvr: code cleanup Jonathan Sims
2017-02-19 23:40 ` Keith Pyle
2017-03-06 11:14 ` Mauro Carvalho Chehab [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=20170306081424.59bc59c0@vento.lan \
--to=mchehab@s-opensource.com \
--cc=hverkuil@xs4all.nl \
--cc=jonathan.625266@earthlink.net \
--cc=kpyle@austin.rr.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ryleyjangus@gmail.com \
/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