From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: "Honza Petrouš" <jpetrous@gmail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Julia Lawall <Julia.Lawall@lip6.fr>,
Hans Verkuil <hans.verkuil@cisco.com>,
Max Kellermann <max.kellermann@gmail.com>
Subject: Re: [PATCH 2/5] media: stv6110: get rid of a srate dead code
Date: Fri, 15 Sep 2017 06:46:48 -0300 [thread overview]
Message-ID: <20170915064648.255b161e@vento.lan> (raw)
In-Reply-To: <CAJbz7-3UQntON2hj6=4SCr82G_TrXvU5Voz8OAV=BPw=F+8xeQ@mail.gmail.com>
Em Fri, 15 Sep 2017 11:30:11 +0200
Honza Petrouš <jpetrous@gmail.com> escreveu:
> Mauro, you are so speedy :)
>
> 2017-09-15 11:10 GMT+02:00 Mauro Carvalho Chehab <mchehab@s-opensource.com>:
> > The stv6110 has a weird code that checks if get_property
> > and set_property ioctls are defined. If they're, it initializes
> > a "srate" var from properties cache. Otherwise, it sets to
> > 15MBaud, with won't make any sense.
> >
> > Thankfully, it seems that someone already noticed, as the
> > "srate" is not used anywhere!
>
> Hehe! "Someone else" :)
Yeah, true!
Just to be clear, I meant to say above that probably someone
noticed it in the past, and got rid of the usage of srate upstream,
but forgot to remove the var :-)
I updated the text. See enclosed.
>
> >
> > So, get rid of that really weird dead code logic.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
>
> Reported-by: Honza Petrous <jpetrous@gmail.com>
Thanks for reporting it!
Thanks,
Mauro
-
[PATCH] media: stv6110: get rid of a srate dead code
The stv6110 has a weird code that checks if get_property
and set_property ioctls are defined. If they're, it initializes
a "srate" var from properties cache. Otherwise, it sets to
15MBaud, with won't make any sense.
Thankfully, it seems that someone else discovered the issue in
the past, as "srate" is currently not used anywhere!
So, get rid of that really weird dead code logic.
Reported-by: Honza Petrous <jpetrous@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
diff --git a/drivers/media/dvb-frontends/stv6110.c b/drivers/media/dvb-frontends/stv6110.c
index e4fd9c1b0560..2821f6da6764 100644
--- a/drivers/media/dvb-frontends/stv6110.c
+++ b/drivers/media/dvb-frontends/stv6110.c
@@ -262,7 +262,6 @@ static int stv6110_set_frequency(struct dvb_frontend *fe, u32 frequency)
u8 ret = 0x04;
u32 divider, ref, p, presc, i, result_freq, vco_freq;
s32 p_calc, p_calc_opt = 1000, r_div, r_div_opt = 0, p_val;
- s32 srate;
dprintk("%s, freq=%d kHz, mclk=%d Hz\n", __func__,
frequency, priv->mclk);
@@ -273,13 +272,6 @@ static int stv6110_set_frequency(struct dvb_frontend *fe, u32 frequency)
((((priv->mclk / 1000000) - 16) & 0x1f) << 3);
/* BB_GAIN = db/2 */
- if (fe->ops.set_property && fe->ops.get_property) {
- srate = c->symbol_rate;
- dprintk("%s: Get Frontend parameters: srate=%d\n",
- __func__, srate);
- } else
- srate = 15000000;
-
priv->regs[RSTV6110_CTRL2] &= ~0x0f;
priv->regs[RSTV6110_CTRL2] |= (priv->gain & 0x0f);
next prev parent reply other threads:[~2017-09-15 9:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 9:10 [PATCH 1/5] media: stv0288: get rid of set_property boilerplate Mauro Carvalho Chehab
2017-09-15 9:10 ` [PATCH 2/5] media: stv6110: get rid of a srate dead code Mauro Carvalho Chehab
2017-09-15 9:30 ` Honza Petrouš
2017-09-15 9:46 ` Mauro Carvalho Chehab [this message]
2017-09-15 9:10 ` [PATCH 3/5] media: friio-fe: get rid of set_property() Mauro Carvalho Chehab
2017-09-15 9:11 ` [PATCH 4/5] media: dvb_frontend: get rid of get_property() callback Mauro Carvalho Chehab
2017-09-15 9:11 ` [PATCH 5/5] media: dvb_frontend: get rid of set_property() callback Mauro Carvalho Chehab
2017-09-15 10:05 ` Mauro Carvalho Chehab
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=20170915064648.255b161e@vento.lan \
--to=mchehab@s-opensource.com \
--cc=Julia.Lawall@lip6.fr \
--cc=hans.verkuil@cisco.com \
--cc=jpetrous@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=max.kellermann@gmail.com \
--cc=mchehab@infradead.org \
--cc=sakari.ailus@linux.intel.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 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.