[<prev] [next>] [day] [month] [year] [list]
Message-ID: <04032bab-ad6f-4ef1-9600-27554233b9a1@web.de>
Date: Sat, 22 Feb 2025 14:44:30 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: kernel-janitors@...r.kernel.org, cocci@...ia.fr
Cc: LKML <linux-kernel@...r.kernel.org>, Hans Verkuil <hverkuil@...all.nl>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Peter Zijlstra <peterz@...radead.org>, Ricardo Ribalda <ribalda@...omium.org>
Subject: [RFC] Extending usage of attribute “__free” (with SmPL)?
Hello,
Various software extensions were developed based on the programming language “C”.
* Object-oriented software development became supported with some programming languages.
* Scope-based resource management became also supported for Linux components
to some degree.
See also the commit 54da6a0924311c7cf5015533991e44fb8eb12773 ("locking:
Introduce __cleanup() based infrastructure") from 2023-06-26.
Some contributors are still struggling with corresponding collateral evolution.
But a well-known source code cross-referencer can point out that an identifier
like “__free” is used in 281 source files so far.
https://elixir.bootlin.com/linux/v6.14-rc3/A/ident/__free
See also a previous presentation of analysis results:
https://lore.kernel.org/cocci/e8bf7b33-01da-43fb-b71e-cd86a02be2e6@web.de/
https://sympa.inria.fr/sympa/arc/cocci/2024-10/msg00011.html
https://lkml.org/lkml/2024/10/17/1393
Thus there can be a need to adapt advice which can be offered also by
coccicheck scripts.
Example:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/free/put_device.cocci?h=v6.14-rc3#n2
The attribute “__free” belongs to properties of variable definitions.
Source code search approaches can eventually be adjusted also by the means of
the semantic patch language.
Corresponding software run time characteristics might become more interesting.
How will development interests evolve accordingly?
Regards,
Markus
Powered by blists - more mailing lists