From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Devin Heitmueller <dheitmueller@kernellabs.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: [PATCH] au8522: remove duplicate code
Date: Tue, 22 May 2018 12:09:22 -0500 [thread overview]
Message-ID: <20180522170922.GA30834@embeddedor.com> (raw)
This code has been there for nine years now, and it has been
working "good enough" since then [1].
Remove duplicate code by getting rid of the if-else statement.
[1] https://marc.info/?l=linux-kernel&m=152693550225081&w=2
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/media/dvb-frontends/au8522_decoder.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/media/dvb-frontends/au8522_decoder.c b/drivers/media/dvb-frontends/au8522_decoder.c
index 343dc92..f285096 100644
--- a/drivers/media/dvb-frontends/au8522_decoder.c
+++ b/drivers/media/dvb-frontends/au8522_decoder.c
@@ -280,14 +280,12 @@ static void setup_decoder_defaults(struct au8522_state *state, bool is_svideo)
AU8522_TOREGAAGC_REG0E5H_CVBS);
au8522_writereg(state, AU8522_REG016H, AU8522_REG016H_CVBS);
- if (is_svideo) {
- /* Despite what the table says, for the HVR-950q we still need
- to be in CVBS mode for the S-Video input (reason unknown). */
- /* filter_coef_type = 3; */
- filter_coef_type = 5;
- } else {
- filter_coef_type = 5;
- }
+ /*
+ * Despite what the table says, for the HVR-950q we still need
+ * to be in CVBS mode for the S-Video input (reason unknown).
+ */
+ /* filter_coef_type = 3; */
+ filter_coef_type = 5;
/* Load the Video Decoder Filter Coefficients */
for (i = 0; i < NUM_FILTER_COEF; i++) {
--
2.7.4
next reply other threads:[~2018-05-22 17:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 17:09 Gustavo A. R. Silva [this message]
2018-05-22 17:18 ` [PATCH] au8522: remove duplicate code Devin Heitmueller
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=20180522170922.GA30834@embeddedor.com \
--to=gustavo@embeddedor.com \
--cc=dheitmueller@kernellabs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@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