checkpatch: better --fix of SPACING errors.
authorJoe Perches <joe@perches.com>
Wed, 11 Sep 2013 21:24:01 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:58:48 +0000 (15:58 -0700)
commitb34c648bb33ca143b98851fd7fe7250f1875c463
treef3e531f96906eb951677147daf8b15cdbde3a309
parentf95a7e6a462ed1338bd576ccb557ff86772a0776
checkpatch: better --fix of SPACING errors.

Previous attempt at fixing SPACING errors could make a hash of several
defects.

This patch should make --fix be a lot better at correcting these defects.

Trim left and right sides of these defects appropriately instead of a
somewhat random attempt at it.

Trim left spaces from any following bit of the modified line when only a
single space is required around an operator.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Phil Carmody <phil.carmody@partner.samsung.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl