mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Extending usage of attribute “__free” (with SmPL)?
@ 2025-02-22 13:44 Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2025-02-22 13:44 UTC (permalink / raw)
  To: kernel-janitors, cocci
  Cc: LKML, Hans Verkuil, Jonathan Cameron, Peter Zijlstra, Ricardo Ribalda

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-22 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-22 13:44 [RFC] Extending usage of attribute “__free” (with SmPL)? Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®