summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends/tda18271c2dd.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-04 01:06:07 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-28 00:55:44 +0400
commitea90f011fdcc3d4fde78532eab8af09637176765 (patch)
treeb1ba42bbecd833fda9638d46af4da9a100701c3f /drivers/media/dvb/frontends/tda18271c2dd.c
parentb01fbc10e3c789763b2c953984bc4b80f59bcdf3 (diff)
downloadlinux-ea90f011fdcc3d4fde78532eab8af09637176765.tar.xz
[media] drxk: Remove the CHK_ERROR macro
The CHK_ERROR macro does a flow control, violating chapter 12 of the Documentation/CodingStyle. Doing flow controls inside macros is a bad idea, as it hides what's happening. It also hides the var "status" with is also a bad idea. The changes were done by this small perl script: my $blk=0; while (<>) { s /^\s+// if ($blk); $f =~ s/\s+$// if ($blk && /^\(/); $blk = 1 if (!m/\#/ && m/CHK_ERROR/); $blk=0 if ($blk && m/\;/); s/\n/ / if ($blk); $f.=$_; }; $f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;([^\n]*),\n\1status = \2;\3\n\1if (status < 0)\n\1\tbreak;,g; print $f; And manually fixed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/tda18271c2dd.c')
-rw-r--r--drivers/media/dvb/frontends/tda18271c2dd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/frontends/tda18271c2dd.c b/drivers/media/dvb/frontends/tda18271c2dd.c
index a8afc2212728..7f526143ba40 100644
--- a/drivers/media/dvb/frontends/tda18271c2dd.c
+++ b/drivers/media/dvb/frontends/tda18271c2dd.c
@@ -817,7 +817,7 @@ static int ChannelConfiguration(struct tda_state *state,
u8 BP_Filter = 0;
u8 RF_Band = 0;
u8 GainTaper = 0;
- u8 IR_Meas;
+ u8 IR_Meas = 0;
state->IF = IntermediateFrequency;
/* printk("%s Freq = %d Standard = %d IF = %d\n", __func__, Frequency, Standard, IntermediateFrequency); */
@@ -884,7 +884,7 @@ static int ChannelConfiguration(struct tda_state *state,
state->m_Regs[EB4] &= ~0x20; /* LO_forceSrce = 0 */
CHK_ERROR(UpdateReg(state, EB4));
} else {
- u8 PostDiv;
+ u8 PostDiv = 0;
u8 Div;
CHK_ERROR(CalcCalPLL(state, Frequency + IntermediateFrequency));