Re: [cocci] [PATCH] coccinelle: platform_no_drv_owner: Handle also built-in drivers
From: Markus Elfring
Date: Mon Jan 13 2025 - 07:18:46 EST
…
> +++ b/scripts/coccinelle/api/platform_no_drv_owner.cocci
> @@ -10,12 +10,21 @@ virtual org
> virtual report
>
> @match1@
…
> @@
> (
> + builtin_i2c_driver(__driver);
> +|
> + builtin_platform_driver(__driver);
> +|
> + builtin_platform_driver_probe(__driver, ...);
> +|
> module_i2c_driver(__driver);
> |
> module_platform_driver(__driver);
How do you think about to avoid a bit for duplicate SmPL code
(by using nested disjunctions)?
Development idea:
(
(builtin_platform_driver
|builtin_i2c_driver
|module_i2c_driver
|module_platform_driver
)(__driver);
|builtin_platform_driver_probe(__driver, ...);)
Regards,
Markus