Re: linux kernel coding style and checkpatch.pl script
On Thu, Mar 26, 2020 at 02:36:23PM +0300, Konstantin Andreev wrote:
Valdis Klētnieks, 26 Mar 2020 07:13 MSK:
To borrow from Pirates of the Carribean, "They're not exactly rules, they're more like... suggestions..."
Don't split literal strings, it means that grepping the source tree for "already registered" fails. Making grep for a string work is more important than shutting up checkpatch.
Sic! Grepping is important. Given that, why are kernel functions coded in a
| static int __init loglevel(char *str) | {
way, but not old decent
| static int __init | loglevel(char *str) | {
unix way?
Documentation/process/coding-style.rst
Valdis Klētnieks, 26 Mar 2020 07:13 MSK:
Don't split literal strings, it means that grepping the source tree for "already registered" fails. Making grep for a string work is more important than shutting up checkpatch.
On Thu, Mar 26, 2020 at 02:36:23PM +0300, Konstantin Andreev wrote:
Sic! Grepping is important. Given that, why are kernel functions coded in a
| static int __init loglevel(char *str) | {
way, but not old decent unix way:
| static int __init | loglevel(char *str) | {
Greg KH, 26 Mar 2020 15:06 MSK:
Documentation/process/coding-style.rst
This document does not answer my question. It does not even require | static int __init loglevel(char *str) | { style. Here is a relevant part of document: "separate functions with one blank line... EXPORT macro should follow closing function brace ... In function prototypes, include parameter names ... E.g.:" | int system_is_up(void) | { | return system_state == SYSTEM_RUNNING; | } | EXPORT_SYMBOL(system_is_up); That's all. Have I overlooked something? Could you, please, share your own point of view? -- Regards, Konstantin
participants (2)
-
Greg KH -
Konstantin Andreev