All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Ian Jackson <iwj@xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH][4.15] gnttab: work around "may be used uninitialized" warning
Date: Thu, 11 Mar 2021 09:25:30 +0100	[thread overview]
Message-ID: <YEnT+vMOkfz/5Wwx@Air-de-Roger> (raw)
In-Reply-To: <952ca444-2091-b7f1-3559-c728a63af37f@suse.com>

On Thu, Mar 11, 2021 at 09:09:22AM +0100, Jan Beulich wrote:
> On 10.03.2021 18:52, Julien Grall wrote:
> > On 10/03/2021 16:21, Jan Beulich wrote:
> >> On 10.03.2021 15:58, Julien Grall wrote:
> >>> On 10/03/2021 10:13, Jan Beulich wrote:
> >>>     2) A compiler will not be able to help us if we are adding code
> >>> without initialized vaddrs.
> >>>
> >>> It also feels wrong to me to try to write Xen in a way that will make a
> >>> 10 years compiler happy...
> >>
> >> As said above - we've worked around limitations quite a few times
> >> in the past. This is just one more instance.
> > 
> > I find amusing you wrote that when you complained multiple time when 
> > someone was re-using existing bad pattern. :)
> 
> Well, thing is - I don't view this as a bad pattern. The only question
> really is whether NULL is a good initializer here. As per above a non-
> canonical pointer may be better, but then we have quite a few places
> elsewhere to fix.

Sorry for jumping in the middle but I think that would be a very
dangerous move for Xen to do. We have been using implicit conversions
of pointers to booleans all over the place, assuming that NULL ==
false, hence NULL no longer mapping to false would break a lot of our
code.  ie:

if ( foo )
	free(foo);

Would no longer work as expected.

Thanks, Roger.


  reply	other threads:[~2021-03-11  8:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 10:13 [PATCH][4.15] gnttab: work around "may be used uninitialized" warning Jan Beulich
2021-03-10 14:58 ` Julien Grall
2021-03-10 16:21   ` Jan Beulich
2021-03-10 17:52     ` Julien Grall
2021-03-11  8:09       ` Jan Beulich
2021-03-11  8:25         ` Roger Pau Monné [this message]
2021-03-11  8:33           ` Jan Beulich
2021-03-12 10:04       ` Ian Jackson
2021-03-12 10:13         ` Jan Beulich
2021-03-12 10:29           ` Ian Jackson
2021-03-12 11:05             ` Jan Beulich
2021-03-12 15:59         ` Jan Beulich
2021-03-12 16:30           ` Ian Jackson
2021-03-12 11:32 ` Andrew Cooper
2021-03-12 13:08   ` Jan Beulich
2021-03-12 13:18     ` Jan Beulich
2021-03-12 13:20       ` Andrew Cooper
2021-03-12 13:25     ` Andrew Cooper
2021-03-12 13:29       ` Jan Beulich

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=YEnT+vMOkfz/5Wwx@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.