From: Haim Daniel <haimdaniel@gmail.com>
To: linux-media@vger.kernel.org
Cc: Haim Daniel <haim.daniel@gmail.com>
Subject: [PATCH] [media] [pvrusb2]: remove dead retry cmd code
Date: Tue, 6 Jan 2015 00:38:38 +0200 [thread overview]
Message-ID: <1420497518-10375-1-git-send-email-haim.daniel@gmail.com> (raw)
In case a command is timed out, current flow sets the retry_flag
and does nothing.
Signed-off-by: Haim Daniel <haim.daniel@gmail.com>
---
drivers/media/usb/pvrusb2/pvrusb2-encoder.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-encoder.c b/drivers/media/usb/pvrusb2/pvrusb2-encoder.c
index f7702ae..02028aa 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-encoder.c
@@ -145,8 +145,6 @@ static int pvr2_encoder_cmd(void *ctxt,
u32 *argp)
{
unsigned int poll_count;
- unsigned int try_count = 0;
- int retry_flag;
int ret = 0;
unsigned int idx;
/* These sizes look to be limited by the FX2 firmware implementation */
@@ -213,8 +211,6 @@ static int pvr2_encoder_cmd(void *ctxt,
break;
}
- retry_flag = 0;
- try_count++;
ret = 0;
wrData[0] = 0;
wrData[1] = cmd;
@@ -245,11 +241,9 @@ static int pvr2_encoder_cmd(void *ctxt,
}
if (rdData[0] && (poll_count < 1000)) continue;
if (!rdData[0]) {
- retry_flag = !0;
pvr2_trace(
PVR2_TRACE_ERROR_LEGS,
- "Encoder timed out waiting for us"
- "; arranging to retry");
+ "Encoder timed out waiting for us");
} else {
pvr2_trace(
PVR2_TRACE_ERROR_LEGS,
@@ -269,13 +263,6 @@ static int pvr2_encoder_cmd(void *ctxt,
ret = -EBUSY;
break;
}
- if (retry_flag) {
- if (try_count < 20) continue;
- pvr2_trace(
- PVR2_TRACE_ERROR_LEGS,
- "Too many retries...");
- ret = -EBUSY;
- }
if (ret) {
del_timer_sync(&hdw->encoder_run_timer);
hdw->state_encoder_ok = 0;
--
1.9.3
next reply other threads:[~2015-01-05 22:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 22:38 Haim Daniel [this message]
2015-01-16 10:57 ` [PATCH] [media] [pvrusb2]: remove dead retry cmd code Hans Verkuil
2015-01-16 11:29 ` Haim Daniel
2015-01-16 11:37 ` Hans Verkuil
2015-01-16 11:45 ` Haim Daniel
2015-01-25 0:45 ` Mike Isely
2015-01-25 23:37 ` isely
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=1420497518-10375-1-git-send-email-haim.daniel@gmail.com \
--to=haimdaniel@gmail.com \
--cc=haim.daniel@gmail.com \
--cc=linux-media@vger.kernel.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