From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-sparse@vger.kernel.org
Subject: Re: [PATCH] The require_context attribute
Date: Tue, 1 Apr 2008 16:41:03 +0200 [thread overview]
Message-ID: <200804011641.03952.philipp.reisner@linbit.com> (raw)
In-Reply-To: <e51f66da0804010710x13711acdy8862b5632db94012@mail.gmail.com>
Am Dienstag, 1. April 2008 16:10:27 schrieb Marko Kreen:
> On 4/1/08, Philipp Reisner <philipp.reisner@linbit.com> wrote:
> > Am Dienstag, 1. April 2008 12:07:17 schrieb Darren Jenkins:
> > > G'day Philipp
> > >
> > > On Mon, Mar 31, 2008 at 11:00 PM, Philipp Reisner
> > >
> > > <philipp.reisner@linbit.com> wrote:
> > > > + ctc = &ctype->ctype;
> > > > + if (ctc)
> > > > + ad->ctx_reqs = ctc->ctx_reqs;
> > >
> > > is this right ? or am I just confused ?
> >
> > Good day Darren,
> >
> > Could you elaborate in a bit more detail your concerns regarding
> > these lines ?
>
> You take an address, how can it be NULL?
Oh, right, now I see it. Sorry. Of course that can not be NULL.
diff --git a/linearize.c b/linearize.c
index 6d401df..67c8744 100644
--- a/linearize.c
+++ b/linearize.c
@@ -888,14 +888,11 @@ static int linearize_address_gen(struct entrypoint *ep,
struct access_data *ad)
{
struct symbol *ctype = expr->ctype;
- struct ctype *ctc = NULL;
if (!ctype)
return 0;
- ctc = &ctype->ctype;
- if (ctc)
- ad->ctx_reqs = ctc->ctx_reqs;
+ ad->ctx_reqs = ctype->ctype.ctx_reqs;
ad->pos = expr->pos;
ad->result_type = ctype;
ad->source_type = base_type(ctype);
-Phil
--
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :
next prev parent reply other threads:[~2008-04-01 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-31 12:00 [PATCH] The require_context attribute Philipp Reisner
2008-04-01 10:07 ` Darren Jenkins
2008-04-01 14:00 ` Philipp Reisner
2008-04-01 14:10 ` Marko Kreen
2008-04-01 14:41 ` Philipp Reisner [this message]
2008-04-02 8:13 ` Darren Jenkins
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=200804011641.03952.philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=linux-sparse@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;
as well as URLs for NNTP newsgroup(s).