Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Krzysztof Kozlowski and committed by
Andrew Morton
f23e76a3 347b5645

+9
+9
scripts/coccinelle/api/platform_no_drv_owner.cocci
··· 10 10 virtual report 11 11 12 12 @match1@ 13 + declarer name builtin_i2c_driver; 14 + declarer name builtin_platform_driver; 15 + declarer name builtin_platform_driver_probe; 13 16 declarer name module_i2c_driver; 14 17 declarer name module_platform_driver; 15 18 declarer name module_platform_driver_probe; 16 19 identifier __driver; 17 20 @@ 18 21 ( 22 + builtin_i2c_driver(__driver); 23 + | 24 + builtin_platform_driver(__driver); 25 + | 26 + builtin_platform_driver_probe(__driver, ...); 27 + | 19 28 module_i2c_driver(__driver); 20 29 | 21 30 module_platform_driver(__driver);