From: Markus Elfring <Markus.Elfring@web.de>
To: kernel-janitors@vger.kernel.org, cocci@inria.fr
Cc: LKML <linux-kernel@vger.kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Peter Zijlstra <peterz@infradead.org>,
Ricardo Ribalda <ribalda@chromium.org>
Subject: [cocci] [RFC] Extending usage of attribute “__free” (with SmPL)?
Date: Sat, 22 Feb 2025 14:44:30 +0100 [thread overview]
Message-ID: <04032bab-ad6f-4ef1-9600-27554233b9a1@web.de> (raw)
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
reply other threads:[~2025-02-22 13:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04032bab-ad6f-4ef1-9600-27554233b9a1@web.de \
--to=markus.elfring@web.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=cocci@inria.fr \
--cc=hverkuil@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=ribalda@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).