Skip to content

Commit

Permalink
Follow the kernel code style better
Browse files Browse the repository at this point in the history
This adds indent rules applying the kernel code style recommendations
and fixes up most of the style issues in the code.

It also cleans up some logic to be simpler to read and declares more
functions as static.

The original coding style is defined in in the Linux source tree at
`/usr/src/linux/scripts/Lindent`.

Signed-off-by: Kai Krakow <[email protected]>
  • Loading branch information
kakra committed May 8, 2020
1 parent 3f0972f commit 8ec191c
Show file tree
Hide file tree
Showing 5 changed files with 325 additions and 304 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

[Makefile*]
indent_style = tab
indent_size = 8

[*.{c,h}]
indent_style = tab
indent_size = 4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*~
.vscode/**
docs/Gemfile.lock
docs/_site/**
Expand Down
8 changes: 8 additions & 0 deletions .indent.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1
-il0
-npsl
-T__s32
-Ts32
-Tu16
-Tu32
-Tu8
3 changes: 3 additions & 0 deletions hid-xpadneo/src/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.{c,h}]
indent_style = tab
indent_size = 8
Loading

0 comments on commit 8ec191c

Please sign in to comment.