diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-03 18:45:37 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:55:45 -0300 |
commit | af070bd60fc3aef4afc2a3de5562139ad3f031d9 (patch) | |
tree | 8a8e8c14c4bbeb3a42f4ee7b68a6ee2e7c445af8 /drivers/media/dvb/ddbridge | |
parent | 1bd09ddcffb2fb59d3211a9137d9122171724bae (diff) | |
download | op-kernel-dev-af070bd60fc3aef4afc2a3de5562139ad3f031d9.zip op-kernel-dev-af070bd60fc3aef4afc2a3de5562139ad3f031d9.tar.gz |
cxd2099: 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/ddbridge')
0 files changed, 0 insertions, 0 deletions