On Fri, Jul 25, 2025 at 1:19 PM Mulyadi Santosa <mulyadi.sant...@gmail.com> wrote: > Interesting idea. Other than silencing clang analyzer warning, what is > exactly the advantage of using such macro?
Well there are three main advantages that I saw: - Clarity to readers that the pointer is guaranteed to be non-null, and that a check is redundant (because performance critical context, etc.) - Future patches that decide to use this macro can be a signal to reviewers to actually check correctness that a pointer is indeed invariably non-null - Make static analysis more useful by documenting when a certain false positive is actually false I also wondered if it could reduce the possibility and volume of AI generated patches from just running analyzers on the kernel to reduce noise. I was also planning to create a heuristic tool to check a patch if a code change could affect a path using this macro and break the assertion. Raka _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies