[Linux-kernel-mentees] [PATCH v5 0/2] checkpatch: add verbose mode
joe at perches.com
Sat Feb 20 15:14:46 UTC 2021
On Sat, 2021-02-20 at 17:32 +0530, Dwaipayan Ray wrote:
> Add a new verbose mode to checkpatch. The verbose test
> descriptions are read from the checkpatch documentation
> file at `Documentation/dev-tools/checkpatch.rst`.
> The verbose mode is optional and can be enabled by the
> flag -v or --verbose.
> The documentation file is only parsed by checkpatch.pl
> if the verbose mode is enabled. The verbose mode can
> not be used together with the --terse option.
> Changes in v5:
> - Change the reference format to use absolute links.
> - Print verbose descriptions only for the first time
> a message type is encountered.
OK, I think a nice addition would be to add --verbose
text to the --list-types option when used together.
$ ./scripts/checkpatch.pl --list-types --verbose
The first argument for kcalloc or kmalloc_array should be the
number of elements. sizeof() as the first argument is generally
The allocation style is bad. In general for family of
allocation functions using sizeof() to get memory size,
p = alloc(sizeof(struct foo), ...)
p = alloc(sizeof(*p), ...)
More information about the Linux-kernel-mentees