Run below command to check kernel doc
scripts/kernel-doc -v -none <file/directory>
e.g.
scripts/kernel-doc -v -none drivers/foo/bar.c
Reference:
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html
Run below command to check kernel doc
scripts/kernel-doc -v -none <file/directory>
e.g.
scripts/kernel-doc -v -none drivers/foo/bar.c
Reference:
https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html
Sparse is static analysis tool. We can run Sparse on Linux kernel to find code issues.
Here is now I managed to run Sparse on Linux kernel.
Clone sparse
git clone git://git.kernel.org/pub/scm/devel/sparse/sparse.git
cd sparse
Build sparse
make
Install sparse
make install
This will install sparse in user’s home directory ~/bin/. If you want to install to some other directory, you can provide PREFIX parameter
make PREFIX=<install-directory> install
Add sparse binary to PATH
export PATH=~/bin/:$PATH
Here you may need to use path provided as PREFIX instead of ~/bin if PREFIX option is used while installing.
There are different options to run sparse:
# Run Sparse on files being compiled
make C=1
# Run Sparse on files all files
make C=2
# Run Sparse on driver/firmware directory (all files)
make C=2 drivers/firmware/
# Provide ARCH and cross-compile options
make ARCH=<> CROSS_COMPILE=<> C=2