I tried it. Not worked unfortunately,.You might try something with clang-format. It doesn't have a built-in style option for the kernel (probably because the kernel can't currently be compiled with Clang/LLVM, but Linux does qualify for the first two criteria for having a new style default added, so if someone wants to actually work on it, they could probably get it included), but something like this for the config should get you pretty close:
```bash
$ ~/share/linux/scripts/checkpatch.pl --fix --types=spacing testcompletion.c
total: 0 errors, 0 warnings, 0 lines checked
testcompletion.c has no obvious style problems and is ready for submission.
NOTE: Used message types: SPACING
```
2015-12-19 14:16 GMT+08:00 Joe Perches <joe@xxxxxxxxxxx>:
On Sat, 2015-12-19 at 13:50 +0800, chunguang qu wrote:
Yes, I just tried `scripts/Lindent` and it has the same problem.
I had compared the source of `Lindent` with `-linux` option of
`indent` long time ago, there's seems no major difference.
So i used `indent -linux <file>` above.
Thanks for your advice about `emace`, but `vi` is my only editor for
dozens of years.
Try:
$ ./scripts/checkpatch.pl --fix --types=spacing <file>