forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
b01fbc10e3
commit
ea90f011fd
File diff suppressed because it is too large
Load Diff
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user