]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: check for if's with unnecessary parentheses
authorJoe Perches <joe@perches.com>
Fri, 3 Jan 2014 03:10:18 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:18 +0000 (14:10 +1100)
commit88047892d41d9be2b556849f3df87d9f7501c408
treeb4ee7a1e01245056a50f83f1d36bcc8aaf964a26
parent587f1527b39c9a081a5dc532b3469dcf99de8a81
checkpatch: check for if's with unnecessary parentheses

If statements don't need multiple parentheses around tested comparisons
like "if ((foo == bar))".

An == comparison maybe a sign of an intended assignment, so emit a
slightly different message if so.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl