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>
1 file changed