All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>,
	Yuan Can <yuancan@huawei.com>,
	cocci@inria.fr
Cc: Nicolas Palix <nicolas.palix@imag.fr>, kernel-janitors@vger.kernel.org
Subject: Re: [cocci] [v3 1/2] coccinelle: locks: add missing_mutex_init.cocci script
Date: Sat, 24 Sep 2022 10:15:52 +0200	[thread overview]
Message-ID: <64bc1278-b783-ea80-9b90-e5da7185425f@web.de> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2209232125480.2720@hadrien>

>> Would it be relevant to use the SmPL construct “<+... … ...+>”?
> Not in a structure definition.


Will further explanations become helpful for this functionality?



>> Please take another look at mentioned implementation details for
>> the clarification of such communication difficulties.
>>
>> A)
>> position p != {r2.p};
>>
>> B)
>> position p != find_member.p;
> OK, both are fine.  If there are multiple positions that p should be
> different from then the {} would be required.


I got the impression that different test results are involved.

Do you expect that identical results should be produced
(also according to the selection of such a SmPL constraint variant)?

Can this SmPL constraint be omitted because of an other data processing approach?


>> How do you think about an opposite source code search order?
>>
>> Would you like to search for function calls which require initialised
>> data structures before any additional source code analysis?
> It doesn't make much sense to have a mutex without initializing it.

It is nice that some programming mistakes can be found also by the means of
the semantic patch language.
Limitations of the Coccinelle software will trigger further development
considerations accordingly, won't they?

Can you find a source code search order more desirable than other directions?

Regards,
Markus

  reply	other threads:[~2022-09-24  8:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 11:55 [cocci] [PATCH v3 0/2] coccinelle: Introduce cocci script to detect missing mutext and spin lock initialization Yuan Can
2022-09-22 11:55 ` [cocci] [PATCH v3 1/2] coccinelle: locks: add missing_mutex_init.cocci script Yuan Can
2022-09-22 18:11   ` Markus Elfring
2022-09-23 14:21     ` Julia Lawall
2022-09-23 17:02       ` [cocci] [v3 " Markus Elfring
2022-09-23 17:08         ` Julia Lawall
2022-09-23 17:47           ` Markus Elfring
2022-09-23 19:27             ` Julia Lawall
2022-09-24  8:15               ` Markus Elfring [this message]
2022-09-24  8:36   ` [cocci] [PATCH v3 " Markus Elfring
2022-09-24 15:40   ` Markus Elfring
2022-09-25 20:33   ` Markus Elfring
2022-09-22 11:55 ` [cocci] [PATCH v3 2/2] coccinelle: locks: add missing_spin_lock_init.cocci script Yuan Can
2022-09-22 17:19 ` [cocci] [PATCH v3 0/2] coccinelle: Introduce cocci script to detect missing mutext and spin lock initialization 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=64bc1278-b783-ea80-9b90-e5da7185425f@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=julia.lawall@inria.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    --cc=yuancan@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.