summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2025-09-11 20:47:27 +0200
committerAndrew Morton <akpm@linux-foundation.org>2025-09-22 20:10:59 -0700
commitf23e76a32dbfc45418a1448f94886eb608b35b98 (patch)
tree9f9dcd6edd6ae8578c53620dc54a5e66ca62d1b1
parent347b564599fb01d8ae1e9f473b82820fea4c2767 (diff)
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>
-rw-r--r--scripts/coccinelle/api/platform_no_drv_owner.cocci9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/coccinelle/api/platform_no_drv_owner.cocci b/scripts/coccinelle/api/platform_no_drv_owner.cocci
index 8fa050eeb7e5..5e869858bda8 100644
--- a/scripts/coccinelle/api/platform_no_drv_owner.cocci
+++ b/scripts/coccinelle/api/platform_no_drv_owner.cocci
@@ -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);