All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Julia Lawall <julia@diku.dk>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/4] drivers/block: adjust NULL test
Date: Fri, 17 Jul 2009 06:31:33 +0000	[thread overview]
Message-ID: <4A601AC5.1010308@kernel.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0907132243110.12374@ask.diku.dk>

Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> 
> dtp is derefenced on the lines above the test !dtp, and so it cannot be
> NULL at this point.
> 
> A simplified version of the semantic match that finds this problem is as
> follows: (http://www.emn.fr/x-info/coccinelle/)
> 
> // <smpl>
> @r@
> expression x,E,E1;
> identifier f,l;
> position p1,p2;
> @@
> 
> *x@p1->f = E1;
> ... when != x = E
>     when != goto l;
> (
> *x@p2 = NULL
> |
> *x@p2 != NULL
> )
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>

Indeed, added to my temp block tree.  Will forward upstream in a few
days.

Thanks.

-- 
tejun

WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: Julia Lawall <julia@diku.dk>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/4] drivers/block: adjust NULL test
Date: Fri, 17 Jul 2009 15:31:33 +0900	[thread overview]
Message-ID: <4A601AC5.1010308@kernel.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0907132243110.12374@ask.diku.dk>

Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> 
> dtp is derefenced on the lines above the test !dtp, and so it cannot be
> NULL at this point.
> 
> A simplified version of the semantic match that finds this problem is as
> follows: (http://www.emn.fr/x-info/coccinelle/)
> 
> // <smpl>
> @r@
> expression x,E,E1;
> identifier f,l;
> position p1,p2;
> @@
> 
> *x@p1->f = E1;
> ... when != x = E
>     when != goto l;
> (
> *x@p2 == NULL
> |
> *x@p2 != NULL
> )
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>

Indeed, added to my temp block tree.  Will forward upstream in a few
days.

Thanks.

-- 
tejun

  reply	other threads:[~2009-07-17  6:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 20:43 [PATCH 1/4] drivers/block: adjust NULL test Julia Lawall
2009-07-13 20:43 ` Julia Lawall
2009-07-17  6:31 ` Tejun Heo [this message]
2009-07-17  6:31   ` Tejun Heo

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=4A601AC5.1010308@kernel.org \
    --to=tj@kernel.org \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 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.