summaryrefslogtreecommitdiff
path: root/Documentation/dev-tools/checkpatch.rst
AgeCommit message (Collapse)AuthorFilesLines
2021-10-05Revert "docs: checkpatch: add UNNECESSARY/UNSPECIFIED_INT and UNNECESSARY_ELSE"Jonathan Corbet1-47/+0
This reverts commit cbb817fc2effcbee0eb44303eefbc8171fc2b12f. Late-arriving nacks make it clear that I applied this one too soon. Link: https://lore.kernel.org/lkml/CAKXUXMzEFQd1JJhx4ZbBQiuSB7Fk3bd7dwJYmPOvEtMqZopxpg@mail.gmail.com/ Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-09-27docs: checkpatch: add multiline, do/while, and multiple-assignment messagesUtkarsh Verma1-0/+43
Added and documented 3 new message types: - MULTILINE_DEREFERENCE - SINGLE_STATEMENT_DO_WHILE_MACRO - MULTIPLE_ASSIGNMENTS Signed-off-by: Utkarsh Verma <utkarshverma294@gmail.com> Link: https://lore.kernel.org/r/20210925163852.12096-1-utkarshverma294@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-09-27docs: checkpatch: add UNNECESSARY/UNSPECIFIED_INT and UNNECESSARY_ELSEUtkarsh Verma1-0/+47
Added and documented 3 new message types: - UNNECESSARY_INT - UNSPECIFIED_INT - UNNECESSARY_ELSE Signed-off-by: Utkarsh Verma <utkarshverma294@gmail.com> Link: https://lore.kernel.org/r/20210925201746.15917-1-utkarshverma294@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-09-15Documentation: checkpatch: Add SYMBOLIC_PERMS messageUtkarsh Verma1-0/+11
Add a new message type SYMBOLIC_PERMS under the 'Permissions' subsection. Octal permission bits are easier to read and understand instead of their symbolic macro names. Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Utkarsh Verma <utkarshverma294@gmail.com> Reviewed-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Acked-by: Dwaipayan Ray <dwaipayanray1@gmail.com> Link: https://lore.kernel.org/r/20210904082330.14864-1-utkarshverma294@gmail.com [jc: Tweaked wording as suggested by Dwaipayan Ray] Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-09-15Documentation: checkpatch: Add TRAILING_SEMICOLON messageUtkarsh Verma1-0/+21
Add a new message type TRAILING_SEMICOLON for the macro definitions that conclude with a semicolon. Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Utkarsh Verma <utkarshverma294@gmail.com> Link: https://lore.kernel.org/r/20210904074201.13532-1-utkarshverma294@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-09-15Documentation: checkpatch: Add SPLIT_STRING messageUtkarsh Verma1-0/+6
Add a new message type SPLIT_STRING under the 'Indentation and Line Breaks' subsection. Checkpatch documentation for the splitting of quoted strings that appear in userspace, across multiple lines. Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Utkarsh Verma <utkarshverma294@gmail.com> Link: https://lore.kernel.org/r/20210904073621.12987-1-utkarshverma294@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-06-15docs: checkpatch: Document and segregate more checkpatch message typesDwaipayan Ray1-71/+328
Add and document more checkpatch message types. About 50% of all message types are documented now. In addition to this: - Create a new subsection 'Indentation and Line Breaks'. - Rename subsection 'Comment style' to simply 'Comments'. - Refactor some of the existing types to appropriate subsections. Reviewed-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Tested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com> Link: https://lore.kernel.org/r/20210614141132.6881-1-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-05-20Documentation: checkpatch: Tweak BIT() macro includeAndrew Jeffery1-1/+1
While include/linux/bitops.h brings in the BIT() macro, it was moved to include/linux/bits.h in commit 8bd9cb51daac ("locking/atomics, asm-generic: Move some macros from <linux/bitops.h> to a new <linux/bits.h> file"). Since that commit BIT() has moved again into include/vdso/bits.h via commit 3945ff37d2f4 ("linux/bits.h: Extract common header for vDSO"). I think the move to the vDSO header can be considered an implementation detail, so for now update the checkpatch documentation to recommend use of include/linux/bits.h. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Acked-by: Jiri Slaby <jirislaby@kernel.org> Acked-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Acked-by: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20210520093949.511471-1-andrew@aj.id.au Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-05-20docs: Add more message type documentations for checkpatchDwaipayan Ray1-7/+163
- Document a couple of more checkpatch message types. - Add a blank line before all `See:` lines to improve the rst output. - Create a new subsection `Permissions` and move a few types to it. Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com> Acked-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Link: https://lore.kernel.org/r/20210515132348.19082-1-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-03-25docs: document all error message types in checkpatchDwaipayan Ray1-38/+280
All the error message types now have a verbose description. Also there are two new groups of message types: - Macros, Attributes and Symbols - Functions and Variables Rearrange the message types to fit these new groups as needed. Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com> Reviewed-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Link: https://lore.kernel.org/r/20210322082139.33822-1-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-03-07docs: add documentation for checkpatchDwaipayan Ray1-0/+513
Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The checkpatch message types are grouped by usage. Under each group the types are described briefly. 34 of such types are documented. Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com> Link: https://lore.kernel.org/r/20210226093827.12700-2-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>