All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Joe Perches <joe@perches.com>, Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch
Date: Tue, 16 Feb 2021 19:48:52 +0530	[thread overview]
Message-ID: <CABJPP5CaAavDMWy8xmQ8Bxpf5549v8fqOz8Zi=g7g6ZGnCAVmg@mail.gmail.com> (raw)
In-Reply-To: <b2e25e683a3e2f31d4dc2d666e082634e30643b3.camel@perches.com>

On Sun, Feb 14, 2021 at 10:27 PM Joe Perches <joe@perches.com> wrote:
>
> On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote:
> > Add documentation for kernel script checkpatch.pl.
> > This documentation is also parsed by checkpatch to
> > enable a verbose mode.
> >
> > The message types in checkpatch are documented with rst
> > field lists. A total of 33 checkpatch type descriptions
> > are added.
>
> Alphabetic ordering isn't that great for these entries.
> Please group them by use:
>
> whitespace/code layout style:
> SPACING, TRAILING_WHITESPACE, LINE_SPACING
>
> commit message defects:
> BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL, COMMIT_MESSAGE
>
> Allocation style:
> group: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY
>
> > diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
> []
> > +4 Type Descriptions
> > +-------------------
> > +
> > +This section contains a description of all the message types in checkpatch.
> > +
> > +.. Types in this section are also parsed by checkpatch.
> > +.. Please keep the types sorted alphabetically.
> > +
> > +:ALLOC_ARRAY_ARGS:
> > +  The first argument for kcalloc or kmalloc_array should be the
> > +  number of elements.  sizeof() as the first argument is generally
> > +  wrong.
>
> If you look at the generated .html file, the output format  is poor.
>
> It would probably be better to use
> **<TYPE>**
> for each of these blocks instead of
> :<TYPE>:
>
> and update the script appropriately.
>

Hi,
Could I get some comment on this grouping for types:

Allocation Style: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY

API Usage: ARCH_DEFINES, ARCH_INCLUDE_LINUX, ARRAY_SIZE, AVOID_BUG,
                    AVOID_EXTERNS, AVOID_L_PREFIX, BIT_MACRO, CONSIDER_KSTRTO

Comment Style: BLOCK_COMMENT_STYLE, C99_COMMENTS

Commit Message: BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL,
                              COMMIT_MESSAGE, MISSING_SIGN_OFF,
NO_AUTHOR_SIGN_OFF

Comparison Style: ASSIGN_IN_IF, BOOL_COMPARISON, COMPARISON_TO_NULL,
                               CONSTANT_COMPARISON

Spacing & Brackets: ASSIGNMENT_CONTINUATIONS, BRACES, BRACKET_SPACE,
                                  CODE_INDENT, CONCATENATED_STRING,
LINE_SPACING,
                                  TRAILING_WHITESPACE

Others: CAMELCASE, CONFIG_DESCRIPTION

This is what I have done till now. Any suggestions would be nice and if it looks
okay I would like to send the v4 in.

Thanks & Regards,
Dwaipayan.

WARNING: multiple messages have this Message-ID (diff)
From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Joe Perches <joe@perches.com>, Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Linux-kernel-mentees] [PATCH RFC v3 2/3] docs: add documentation for checkpatch
Date: Tue, 16 Feb 2021 19:48:52 +0530	[thread overview]
Message-ID: <CABJPP5CaAavDMWy8xmQ8Bxpf5549v8fqOz8Zi=g7g6ZGnCAVmg@mail.gmail.com> (raw)
In-Reply-To: <b2e25e683a3e2f31d4dc2d666e082634e30643b3.camel@perches.com>

On Sun, Feb 14, 2021 at 10:27 PM Joe Perches <joe@perches.com> wrote:
>
> On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote:
> > Add documentation for kernel script checkpatch.pl.
> > This documentation is also parsed by checkpatch to
> > enable a verbose mode.
> >
> > The message types in checkpatch are documented with rst
> > field lists. A total of 33 checkpatch type descriptions
> > are added.
>
> Alphabetic ordering isn't that great for these entries.
> Please group them by use:
>
> whitespace/code layout style:
> SPACING, TRAILING_WHITESPACE, LINE_SPACING
>
> commit message defects:
> BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL, COMMIT_MESSAGE
>
> Allocation style:
> group: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY
>
> > diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
> []
> > +4 Type Descriptions
> > +-------------------
> > +
> > +This section contains a description of all the message types in checkpatch.
> > +
> > +.. Types in this section are also parsed by checkpatch.
> > +.. Please keep the types sorted alphabetically.
> > +
> > +:ALLOC_ARRAY_ARGS:
> > +  The first argument for kcalloc or kmalloc_array should be the
> > +  number of elements.  sizeof() as the first argument is generally
> > +  wrong.
>
> If you look at the generated .html file, the output format  is poor.
>
> It would probably be better to use
> **<TYPE>**
> for each of these blocks instead of
> :<TYPE>:
>
> and update the script appropriately.
>

Hi,
Could I get some comment on this grouping for types:

Allocation Style: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY

API Usage: ARCH_DEFINES, ARCH_INCLUDE_LINUX, ARRAY_SIZE, AVOID_BUG,
                    AVOID_EXTERNS, AVOID_L_PREFIX, BIT_MACRO, CONSIDER_KSTRTO

Comment Style: BLOCK_COMMENT_STYLE, C99_COMMENTS

Commit Message: BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL,
                              COMMIT_MESSAGE, MISSING_SIGN_OFF,
NO_AUTHOR_SIGN_OFF

Comparison Style: ASSIGN_IN_IF, BOOL_COMPARISON, COMPARISON_TO_NULL,
                               CONSTANT_COMPARISON

Spacing & Brackets: ASSIGNMENT_CONTINUATIONS, BRACES, BRACKET_SPACE,
                                  CODE_INDENT, CONCATENATED_STRING,
LINE_SPACING,
                                  TRAILING_WHITESPACE

Others: CAMELCASE, CONFIG_DESCRIPTION

This is what I have done till now. Any suggestions would be nice and if it looks
okay I would like to send the v4 in.

Thanks & Regards,
Dwaipayan.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  parent reply	other threads:[~2021-02-16 14:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 13:15 [PATCH RFC v3 0/3] checkpatch: add verbose mode Dwaipayan Ray
2021-02-13 13:15 ` [Linux-kernel-mentees] " Dwaipayan Ray
2021-02-13 13:15 ` [PATCH RFC v3 1/3] " Dwaipayan Ray
2021-02-13 13:15   ` [Linux-kernel-mentees] " Dwaipayan Ray
2021-02-13 13:15 ` [PATCH RFC v3 2/3] docs: add documentation for checkpatch Dwaipayan Ray
2021-02-13 13:15   ` [Linux-kernel-mentees] " Dwaipayan Ray
2021-02-14 12:15   ` Matthew Wilcox
2021-02-14 12:15     ` [Linux-kernel-mentees] " Matthew Wilcox
2021-02-15 18:11     ` Joe Perches
2021-02-15 18:11       ` [Linux-kernel-mentees] " Joe Perches
2021-02-15 19:12       ` Matthew Wilcox
2021-02-15 19:12         ` [Linux-kernel-mentees] " Matthew Wilcox
2021-02-14 16:57   ` Joe Perches
2021-02-14 16:57     ` [Linux-kernel-mentees] " Joe Perches
2021-02-15 15:50     ` Dwaipayan Ray
2021-02-15 15:50       ` [Linux-kernel-mentees] " Dwaipayan Ray
2021-02-15 15:55       ` Joe Perches
2021-02-15 15:55         ` [Linux-kernel-mentees] " Joe Perches
2021-02-16 14:18     ` Dwaipayan Ray [this message]
2021-02-16 14:18       ` Dwaipayan Ray
2021-02-17 10:37       ` Joe Perches
2021-02-17 10:37         ` [Linux-kernel-mentees] " Joe Perches
2021-02-17 15:46         ` Dwaipayan Ray
2021-02-17 15:46           ` [Linux-kernel-mentees] " Dwaipayan Ray
2021-02-13 13:15 ` [PATCH RFC v3 3/3] " Dwaipayan Ray
2021-02-13 13:15   ` [Linux-kernel-mentees] " Dwaipayan Ray

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='CABJPP5CaAavDMWy8xmQ8Bxpf5549v8fqOz8Zi=g7g6ZGnCAVmg@mail.gmail.com' \
    --to=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.