Thanks Dan for your reply, you made it very clear. regards, Lishu Chang "Dan Carpenter" <dan.carpenter@xxxxxxxxxx>写道: > On Mon, Mar 11, 2024 at 01:31:35PM +0800, 李书畅 wrote: > > Hello Dan, in the smatch.txt, you said : > > 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, > > > > I'd like to know what file does this full-path refer to? And if it means the full path of the C project you want to check, > > what is the difference between using '-p=' and '--full-path'? > > -p stands for --project. It's for when there is project specific code. > Mostly it's the linux kernel which has tons of specific checks. > > The --full-path option is for recursive Makefiles where you enter > sub-directorys and run make. The kernel doesn't use a recursive build > system so all the warning messages have drivers/foo/bar/file.c. Nice. > But with a recursive build system the warning messages just have file.c. > Then when you add --full-path they have > /home/whatever/kernel/drivers/foo/bar/file.c > which isn't as nice, but it's more useful than just file.c > > regards, > dan carpenter