From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Michael Ira Krufky <mkrufky@linuxtv.org>
Cc: Abylay Ospan <aospan@netup.ru>,
linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] [media] lgdt3306a: remove 20*50 msec unnecessary timeout
Date: Mon, 25 Jul 2016 16:28:41 -0300 [thread overview]
Message-ID: <20160725162841.6e11fd2b@recife.lan> (raw)
In-Reply-To: <CAOcJUby+9gTrFUF14pvo1iMa2azD5TfGM8WgeZY1+Bh8CTYVzA@mail.gmail.com>
Hi Michael,
Em Mon, 25 Jul 2016 14:55:51 -0400
Michael Ira Krufky <mkrufky@linuxtv.org> escreveu:
> On Mon, Jul 25, 2016 at 2:38 PM, Abylay Ospan <aospan@netup.ru> wrote:
> > inside lgdt3306a_search we reading demod status 20 times with 50 msec sleep after each read.
> > This gives us more than 1 sec of delay. Removing this delay should not affect demod functionality.
> >
> > Signed-off-by: Abylay Ospan <aospan@netup.ru>
> > ---
> > drivers/media/dvb-frontends/lgdt3306a.c | 16 ++++------------
> > 1 file changed, 4 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
> > index 179c26e..dad7ad3 100644
> > --- a/drivers/media/dvb-frontends/lgdt3306a.c
> > +++ b/drivers/media/dvb-frontends/lgdt3306a.c
> > @@ -1737,24 +1737,16 @@ static int lgdt3306a_get_tune_settings(struct dvb_frontend *fe,
> > static int lgdt3306a_search(struct dvb_frontend *fe)
> > {
> > enum fe_status status = 0;
> > - int i, ret;
> > + int ret;
> >
> > /* set frontend */
> > ret = lgdt3306a_set_parameters(fe);
> > if (ret)
> > goto error;
> >
> > - /* wait frontend lock */
> > - for (i = 20; i > 0; i--) {
> > - dbg_info(": loop=%d\n", i);
> > - msleep(50);
> > - ret = lgdt3306a_read_status(fe, &status);
> > - if (ret)
> > - goto error;
> > -
> > - if (status & FE_HAS_LOCK)
> > - break;
> > - }
Could you please explain why lgdt3306a needs the above ugly hack?
> > + ret = lgdt3306a_read_status(fe, &status);
> > + if (ret)
> > + goto error;
> >
> > /* check if we have a valid signal */
> > if (status & FE_HAS_LOCK)
>
> Your patch removes a loop that was purposefully written here to handle
> conditions that are not ideal. Are you sure this change is best for
> all users?
>
> I would disagree with merging this patch.
>
> Best regards,
>
> Michael Ira Krufky
--
Thanks,
Mauro
next prev parent reply other threads:[~2016-07-25 19:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-25 18:38 [PATCH] [media] lgdt3306a: remove 20*50 msec unnecessary timeout Abylay Ospan
2016-07-25 18:55 ` Michael Ira Krufky
2016-07-25 19:26 ` Abylay Ospan
2016-07-25 19:28 ` Mauro Carvalho Chehab [this message]
2016-07-25 19:37 ` Michael Ira Krufky
2016-07-26 1:36 ` Mauro Carvalho Chehab
2016-07-26 11:11 ` Michael Ira Krufky
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=20160725162841.6e11fd2b@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=aospan@netup.ru \
--cc=linux-media@vger.kernel.org \
--cc=mkrufky@linuxtv.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