[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b994f006-552b-41a8-9714-5efef68f2f12@web.de>
Date: Sat, 27 Sep 2025 11:33:47 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Oleg Petrov <o.petrov@...ras.ru>, cocci@...ia.fr,
dri-devel@...ts.freedesktop.org, lvc-project@...uxtesting.org,
Julia Lawall <Julia.Lawall@...ia.fr>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
Cc: LKML <linux-kernel@...r.kernel.org>, David Airlie <airlied@...il.com>,
Maxime Ripard <mripard@...nel.org>, Nicolas Palix <nicolas.palix@...g.fr>,
Simona Vetter <simona@...ll.ch>, Thomas Zimmermann <tzimmermann@...e.de>,
Vadim Mutilin <mutilin@...ras.ru>
Subject: Re: [cocci] [PATCH] cocci: drm: report devm-allocated arguments and
fields
…> +// find devm-allocated (devres-managed) second arg for drm*init functions
> +@...arg exists@
> +position p;
> +expression devm,e;
> +@@
> +// only devm_kzalloc is really used
> +devm = \(devm_kzalloc\|devm_kcalloc\|devm_kmalloc\|devm_kmalloc_array\)(...);
> +...
…> +// same as above, but with an intermediate local variable
> +@...arg2 exists@
> +position p;
> +expression devm,e;
> +identifier vitm;
> +@@
> +// only devm_kzalloc is really used
> +devm = \(devm_kzalloc\|devm_kcalloc\|devm_kmalloc\|devm_kmalloc_array\)(...);
> +...
> +vitm = <+...devm...+>;
…
Your source code search approach affects recurring development concerns.
The shown rules start with the same SmPL code.
Thus I would find it nicer if such duplicate code can be avoided.
I imagine that software run time characteristics would be more desirable
if selected data processing does not need to be repeated.
The search should obviously be continued after a relevant source code place was found.
…> +@...ipt:python depends on report@
> +p << badarg.p;
…> +@...ipt:python depends on report@
> +p << badarg2.p;
…> +@...ipt:python depends on report@
> +p << badfield.p;
…
Will development interests grow for another clarification approach?
Support for SmPL rule groups
2019-04-07
https://github.com/coccinelle/coccinelle/issues/164
Regards,
Markus
Powered by blists - more mailing lists