The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Coccinelle <cocci@systeme.lip6.fr>,
	LKML <linux-kernel@vger.kernel.org>,
	Cheng Shengyu <cheng.shengyu@zte.com.cn>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Ma Jiang <ma.jiang@zte.com.cn>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Wen Yang <wen.yang99@zte.com.cn>, Yi Wang <wang.yi59@zte.com.cn>
Subject: Re: [3/3] Coccinelle: pci_free_consistent: Extend when constraints for two SmPL ellipses
Date: Wed, 15 May 2019 13:18:29 +0200	[thread overview]
Message-ID: <86e6bf17-966b-06fe-287a-3df7e35736cb@web.de> (raw)
In-Reply-To: <alpine.DEB.2.20.1905151217380.3231@hadrien>



Am 15.05.19 um 12:19 schrieb Julia Lawall:
>
>
> On Wed, 15 May 2019, Markus Elfring wrote:
>
>>>>> On the other hand, I do care about causing false negatives.
>>>>
>>>> Do you find the missing warning after the addition of such an exclusion
>>>> specification interesting?
>>>
>>> I already suggested how to improve the code.
>>
>> I find that the idea “e2->fld” needs further clarification.
>> Such a SmPL specification will be resolved also to an expression,
>> won't it?
>
> Saving in a local variable doesn't impact the need to free the object.

I suggest to reconsider this view.

Would we like to introduce additional case distinctions for the handling
of reassignments to local variables (as shown in Wen's test case)?


> A field is the most obvious case where the object may not need freeing.

A corresponding resource release should probably be performed by
an other function then.


> But there are many expressions that e2->fld will not match.

Data structure members can eventually belong also to a local variable.
Would they become relevant for further SmPL exclusion specifications?

Regards,
Markus

  reply	other threads:[~2019-05-15 11:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201905151043340243098@zte.com.cn>
2019-05-15  6:10 ` [PATCH 3/3] Coccinelle: pci_free_consistent: Extend whenconstraints for two SmPL ellipses Julia Lawall
2019-05-15  8:36   ` [3/3] Coccinelle: pci_free_consistent: Extend when constraints " Markus Elfring
     [not found]     ` <alpine.DEB.2.20.1905151119070.3231@hadrien>
2019-05-15  9:40       ` Markus Elfring
2019-05-15 10:19         ` Julia Lawall
2019-05-15 11:18           ` Markus Elfring [this message]
2019-05-15  6:48 ` Markus Elfring
2019-05-15  7:48   ` Markus Elfring
2019-05-15  6:48 ` Markus Elfring
2019-05-15 12:48 ` Markus Elfring
     [not found] <201905151538552354689@zte.com.cn>
2019-05-15  8:06 ` 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=86e6bf17-966b-06fe-287a-3df7e35736cb@web.de \
    --to=markus.elfring@web.de \
    --cc=Gilles.Muller@lip6.fr \
    --cc=cheng.shengyu@zte.com.cn \
    --cc=cocci@systeme.lip6.fr \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ma.jiang@zte.com.cn \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    --cc=wang.yi59@zte.com.cn \
    --cc=wen.yang99@zte.com.cn \
    --cc=yamada.masahiro@socionext.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox