On Wed, Aug 06, 2025 at 04:17:41PM +0200, Stefan Metzmacher wrote: > > > What was the test that triggered the problem? > > > Or did you only noticed it by looking at the code? > > > > This was a Smatch static checker warning. You need to have the cross > > function DB to detect it. > > Ok, I'll try to integrate it into my build flow... > > Does it replace sparse or does it run in addition? In addition. I find the Sparse endianness checks especially useful. > If it replaces sparse I guess a small script would > run them both? > > $ cat mychecker.sh: > #!/bin/bash > set -e > sparse $@ > smatch $@ > > And maybe all others from > https://gautammenghani.com/linux,/c/2022/05/19/static-analysis-tools-linux-kernel.html > > How often do I need to run smatch_scripts/build_kernel_data.sh on the whole kernel? The cross function database is really useful for just information purposes and looking at how functions are called. You probably would need to rebuild it four or five times to get useful information, unfortunately. I rebuild my every night on the latest linux-next. But for other people, I normally say don't bother with the cross function DB. It takes a long time to build and it only slightly improves the output. regards, dan carpenter