[PATCH 1/3] Documentation/smatch: fix paths in the examples
From: Javier Carrasco
Date: Mon Apr 01 2024 - 16:45:52 EST
A few examples use the '~/progs/smatch/devel/smatch_scripts/' path,
which seems to be a local reference that does not reflect the real
paths in the project (one would not expect 'devel' inside 'smatch').
Use the generic '~/path/to/smatch_dir/' path, which is already used
in some examples.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
---
Documentation/smatch.txt | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/smatch.txt b/Documentation/smatch.txt
index 59106d49..b2c3ac4e 100644
--- a/Documentation/smatch.txt
+++ b/Documentation/smatch.txt
@@ -39,7 +39,7 @@ For projects other than the kernel you run Smatch with the options
"--call-tree --info --param-mapper --spammy" and finish building the
database by running the script:
- ~/progs/smatch/devel/smatch_data/db/create_db.sh
+ ~/path/to/smatch_dir/smatch_data/db/create_db.sh
Each time you rebuild the cross function database it becomes more accurate. I
normally rebuild the database every morning.
@@ -47,18 +47,18 @@ normally rebuild the database every morning.
If you are running Smatch over the whole kernel you can use the following
command:
- ~/progs/smatch/devel/smatch_scripts/test_kernel.sh
+ ~/path/to/smatch_dir/smatch_scripts/test_kernel.sh
The test_kernel.sh script will create a .c.smatch file for every file it tests
and a combined smatch_warns.txt file with all the warnings.
If you are running Smatch just over one kernel file:
- ~/progs/smatch/devel/smatch_scripts/kchecker drivers/whatever/file.c
+ ~/path/to/smatch_dir/smatch_scripts/kchecker drivers/whatever/file.c
You can also build a directory like this:
- ~/progs/smatch/devel/smatch_scripts/kchecker drivers/whatever/
+ ~/path/to/smatch_dir/smatch_scripts/kchecker drivers/whatever/
The kchecker script prints its warnings to stdout.
@@ -69,8 +69,8 @@ Smatch with kernels that are normally built with cross-compilers.
If you are building something else (which is not the Linux kernel) then use
something like:
- make CHECK="~/progs/smatch/devel/smatch --full-path" \
- CC=~/progs/smatch/devel/smatch/cgcc | tee smatch_warns.txt
+ make CHECK="~/path/to/smatch_dir/smatch --full-path" \
+ CC=~/path/to/smatch_dir/smatch/cgcc | tee smatch_warns.txt
The makefile has to let people set the CC with an environment variable for that
to work, of course.
--
2.40.1