]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: fix 'return is not a function' square bracket handling
authorAndy Whitcroft <apw@canonical.com>
Fri, 2 Dec 2011 03:12:45 +0000 (14:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Dec 2011 04:05:34 +0000 (15:05 +1100)
commita67e9a5c34920f5d87bb51a2d7efc6527f5b78c2
tree7cdeed5c2ec428228577028d2366d612c624642d
parentd138f87a940176986a50b7ef0908b0b54392e7a2
checkpatch: fix 'return is not a function' square bracket handling

We are incorrectly matching square brackets '[' and ']' leading to false
positives on more complex functions as below:

    return (dt3155_fbuffer[m]->ready_head -
dt3155_fbuffer[m]->ready_len +
dt3155_fbuffer[m]->nbuffers)%
(dt3155_fbuffer[m]->nbuffers);

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl