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: Fri, 6 Mar 2026 08:15:58 +0100	[thread overview]
Message-ID: <eb4d5476-cd85-43d9-8b23-c02452dfbfb1@web.de> (raw)
In-Reply-To: <726546e758862eac541526151f085401756edc64.1772645314.git.p.hahn@avm.de>

…
> +@p1 depends on patch@
> +expression E;
> +@@
> +(
> +-	E != NULL && !IS_ERR(E)
> ++	!IS_ERR_OR_NULL(E)
> +|
> +-	E == NULL || IS_ERR(E)
> ++	!IS_ERR_OR_NULL(E)
> +|
> +-	!IS_ERR(E) && E != NULL
> ++	IS_ERR_OR_NULL(E)
> +|
> +-	IS_ERR(E) || E == NULL
> ++	IS_ERR_OR_NULL(E)
> +)
…

I find such case distinctions questionable.
Thus I suggest to clarify presented implementation details in more detail
also for better source code transformation approaches.

Regards,
Markus

  parent reply	other threads:[~2026-03-06  7:16 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
2026-03-06  7:15 ` Markus Elfring [this message]
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=eb4d5476-cd85-43d9-8b23-c02452dfbfb1@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