lkml.org 
[lkml]   [2021]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH RFC v3 2/3] docs: add documentation for checkpatch
    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.

    \
     
     \ /
      Last update: 2021-02-17 11:37    [W:2.628 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site