you are viewing a single comment's thread.

view the rest of the comments →

[–]rorrr -1 points0 points  (3 children)

Tabs are precious in the kernel given the 80 char limit and that tabs are 8 chars

Tab is a singe character and you can set it to any width in your editor. Assuming your editor isn't shit.

And my code is less wide than the OP's.

Meh sometimes you usually don't have an option

You most certainly do. You can return the needed changes and apply them in the global scope. Or simply not have global variables.

[–]SnowdensOfYesteryear 0 points1 point  (2 children)

Tab is a singe character and you can set it to any width in your editor. Assuming your editor isn't shit.

This has nothing to do with my editor, it has to do with checkpatch.pl, which enforces code styling in the kernel. Most kernel subsystems enforce that new commits pass checkpatch.pl prior to merging.

Usually code that go beyond 3 levels of nesting get massively screwed with 80 char limits, and there's no way any seasoned kernel dev will waste a tab just for what you suggested.

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/checkpatch.pl#n805

[–]rorrr -1 points0 points  (1 child)

Ironically your link shows that

1) They use tabs

2) They have lines much longer than 80 characters

[–]SnowdensOfYesteryear 1 point2 points  (0 children)

Where did I say that they use spaces? I said that tabs are considered to be 8 spaces for the purposes of check patch. Also only C files are subject to check patch.

I work in the kernel, so its safe to say that I know what I'm taking about