Re: [PATCH] coccinelle: api: add a checker for device nodes in devm_ memory
From: Chad Aldreda
Date: Fri Nov 06 2026 - 16:08:11 EST
On Fri, 6 Nov 2026, Julia Lawall wrote:
> Have you sent any patches based on the results? I'm not an expert on the
> problem being addressed, so it would be helpful to know that the semantic
> patch has led to patches that have been accepted.
Not yet. I'll send fixes for a few of the reported drivers first, and
post v2 once some of them have been reviewed, with links to them.
> The problem you have when you work on a subdirectory is that it doesn't
> know where to find the header files. It should work better with a -I
> option.
I tried that, but the header (ipu6-isys.h) is in the same directory as
the .c file. With --include-headers, -I include, -I include/uapi and
-I arch/x86/include, on drivers/media/pci/intel/ipu6:
--dir, with or without -I drivers/media/pci/intel/ipu6: no report
the directory's .c files named on the command line: ipu6-isys.c:990
make coccicheck M=drivers/media/pci/intel/ipu6 loses it too. It seems to
come from --dir rather than the include path: in a copy holding the
headers and ipu6-isys.c, --dir reports line 990, but adding
ipu6-isys-csi2.c, which also includes ipu6-isys.h, loses it. Unless I
am using -I wrongly, is the header matched only for the first file that
includes it?
> Could you rewrite this in a much more concise format?
Yes, I'll do that in v2.
> Since you only support org and report, you don't really need depends on
> org || report everywhere.
Thanks, I'll drop them.
Chad