coccinelle: platform_no_drv_owner: handle also built-in drivers

builtin_platform_driver() and others also use macro
platform_driver_register() which sets the .owner=THIS_MODULE, so extend
the cocci script to detect these as well.

Link: https://lkml.kernel.org/r/20250911184726.23154-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Julia Lawall <julia.lawall@inria.fr>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Krzysztof Kozlowski 2025-09-11 20:47:27 +02:00 committed by Andrew Morton
parent 347b564599
commit f23e76a32d
1 changed files with 9 additions and 0 deletions

View File

@ -10,12 +10,21 @@ virtual org
virtual report
@match1@
declarer name builtin_i2c_driver;
declarer name builtin_platform_driver;
declarer name builtin_platform_driver_probe;
declarer name module_i2c_driver;
declarer name module_platform_driver;
declarer name module_platform_driver_probe;
identifier __driver;
@@
(
builtin_i2c_driver(__driver);
|
builtin_platform_driver(__driver);
|
builtin_platform_driver_probe(__driver, ...);
|
module_i2c_driver(__driver);
|
module_platform_driver(__driver);