public inbox for cocci@systeme.lip6.fr
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Philipp Hahn <phahn-oss@avm.de>
Cc: cocci@inria.fr
Subject: Re: [cocci] [RFC] Coccinelle: Use IS_ERR_OR_NULL
Date: Thu, 5 Mar 2026 11:20:51 +0100	[thread overview]
Message-ID: <5d971202-2bea-42ec-a963-dfd56cf75b1d@web.de> (raw)
In-Reply-To: <726546e758862eac541526151f085401756edc64.1772645314.git.p.hahn@avm.de>

> after a colleague of mine recently gave a talk about Coccinelle, I had look
> myself and created the below semantic patch to find and convert uses of
> IS_ERR() plus NULL check to IS_ERR_OR_NULL() in the Linux kernel.

Thanks for your growing development interests in such an area.


> On 7.0.0-rc2 the patch applies to 79 files and finds most places I identified
> manually. Fantastic!

Did your code review approach differ from another information representation?
https://elixir.bootlin.com/linux/v7.0-rc1/A/ident/IS_ERR


> How are new semantic patches normally handled:
> - are they first discussed on some mailing list?

Would you like to achieve the integration of another coccicheck script?


> - should I then create the individual patches myself and send them to the
>   subsystem maintainers myself?

The change acceptance can vary between involved maintainers.

Your source code search pattern would represent a refactoring.
Such adjustments fall into the category “code cleanup”.
They might need to be combined with more convincing changes.
https://lore.kernel.org/all/?q=IS_ERR_OR_NULL

Regards,
Markus

  parent reply	other threads:[~2026-03-05 10:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 17:38 [cocci] [RFC] Coccinelle: Use IS_ERR_OR_NULL Philipp Hahn
2026-03-04 18:12 ` Julia Lawall
2026-03-05 10:20 ` Markus Elfring [this message]
2026-03-06  7:15 ` Markus Elfring
2026-03-06  8:26 ` Markus Elfring

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=5d971202-2bea-42ec-a963-dfd56cf75b1d@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=phahn-oss@avm.de \
    /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