From: Marcel Holtmann <marcel@holtmann.org>
To: Himangi Saraogi <himangi774@gmail.com>
Cc: "Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Linux Bluetooth mailing list <linux-bluetooth@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org, julia.lawall@lip6.fr
Subject: Re: [PATCH] Bluetooth: cmtp: Remove unnecessary null test
Date: Mon, 14 Jul 2014 23:02:26 +0200 [thread overview]
Message-ID: <E909042B-4973-4601-92AD-07D948BBDA83@holtmann.org> (raw)
In-Reply-To: <20140714203412.GA16532@himangi-Dell>
Hi Himangi,
> This patch removes the null test on ctrl. ctrl is initialized at the
> beginning of the function to &session->ctrl. Since session is
> dereferenced prior to the null test, session must be a valid pointer,
> and &session->ctrl cannot be null.
>
> The following Coccinelle script is used for detecting the change:
>
> @r@
> expression e,f;
> identifier g,y;
> statement S1,S2;
> @@
>
> *e = &f->g
> <+...
> f->y
> ...+>
> *if (e != NULL || ...)
> S1 else S2
>
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> net/bluetooth/cmtp/capi.c | 6 ------
> 1 file changed, 6 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
prev parent reply other threads:[~2014-07-14 21:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 20:34 Himangi Saraogi
2014-07-14 21:02 ` Marcel Holtmann [this message]
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=E909042B-4973-4601-92AD-07D948BBDA83@holtmann.org \
--to=marcel@holtmann.org \
--cc=davem@davemloft.net \
--cc=gustavo@padovan.org \
--cc=himangi774@gmail.com \
--cc=johan.hedberg@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®