kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Andreev <andreev@swemel.ru>
To: Greg KH <kernelnewbies@kernelnewbies.org>
Subject: Re: linux kernel coding style and checkpatch.pl script
Date: Thu, 26 Mar 2020 16:01:18 +0300	[thread overview]
Message-ID: <E1jHS2A-0004t2-I1@shelob.surriel.com> (raw)
In-Reply-To: <20200326120605.GA1289824@kroah.com>

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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2020-03-26 12:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  9:36 linux kernel coding style and checkpatch.pl script Tomek The Messenger
2020-03-25  9:51 ` Greg KH
2020-03-26  4:13 ` Valdis Klētnieks
2020-03-26 11:36   ` Konstantin Andreev
     [not found]   ` <E1jHQrV-0002Zv-Ln@shelob.surriel.com>
2020-03-26 12:06     ` Greg KH
2020-03-26 13:01       ` Konstantin Andreev [this message]
     [not found]       ` <E1jHS2D-0004t2-IX@shelob.surriel.com>
2020-03-26 13:17         ` Greg KH
2020-03-26 10:57 ` Anuz Pratap Singh Tomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1jHS2A-0004t2-I1@shelob.surriel.com \
    --to=andreev@swemel.ru \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).