cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Denis Efremov <efremov@linux.com>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	cocci@inria.fr, kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns
Date: Fri, 19 Apr 2024 08:51:19 +0200	[thread overview]
Message-ID: <f1f47166-00d7-49f3-9b80-34aa7b7b5510@web.de> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2404182255010.3213@hadrien>

>> Most of the people prefer:
>>
>> return ret < 0 ? ret: 0;
>>
>> than:
>>
>> return min(ret, 0);
>>
>> Let's tweak the cocci file to ignore those lines completely.
> Applied, thanks. (Coccinelle for-6.10 branch).

Was a planned code adjustment published?


…
>> +++ b/scripts/coccinelle/misc/minmax.cocci
>> @@ -50,11 +50,26 @@ func(...)
>>  	...>
>>  }
>>
>> +// Ignore errcode returns.
>> +@errcode@
>> -// Don't generate patches for errcode returns.
>> -@errcode depends on patch@
…

How does such a change fit to the usability of the coccicheck operation modes
“context” and “org”?

Should dependencies be reconsidered any more for the desired consistency
of involved rules for scripts of the semantic patch language?

Regards,
Markus

  reply	other threads:[~2024-04-19  6:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 21:15 [cocci] [PATCH] coccinelle: misc: minmax: Suppress reports for err returns Ricardo Ribalda
2024-04-16  8:32 ` Julia Lawall
2024-04-16 11:30 ` Markus Elfring
2024-04-16 11:32   ` Ricardo Ribalda
2024-04-16 11:50     ` Markus Elfring
     [not found]       ` <CANiDSCtZzAs0u2tqJGRaJz6iqCTu_p-j_rkyGU7a9HFqUbJEMg@mail.gmail.com>
2024-04-17 13:02         ` [cocci] " Markus Elfring
2024-04-18 20:55 ` [cocci] [PATCH] " Julia Lawall
2024-04-19  6:51   ` Markus Elfring [this message]
2024-04-19  7:01     ` Julia Lawall

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=f1f47166-00d7-49f3-9b80-34aa7b7b5510@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=efremov@linux.com \
    --cc=julia.lawall@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    --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 NNTP newsgroup(s).