qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Zhang Haoyu" <zhanghy@sangfor.com.cn>
To: "Peter Maydell" <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] spice-char: fix wrong assert condition
Date: Mon, 19 Jan 2015 14:15:21 +0800	[thread overview]
Message-ID: <201501191415200853264@sangfor.com.cn> (raw)
In-Reply-To: CAFEAcA__N7VSVv6wO8aWwnT60xV4QAcoopux4jJrvhk4i7pTMg@mail.gmail.com


On 2015-01-17 19:55:16, Peter Maydell wrote:
>On 17 January 2015 at 11:52, Peter Maydell <peter.maydell@linaro.org> wrote:
> > On 17 January 2015 at 06:48, Zhang Haoyu <zhanghy@sangfor.com.cn> wrote:
> >> G_IO_OUT|G_IO_HUP are passed from all of the callers
> >> of chr_add_watch hooker, the assert condition MUST be
> >> changed.
>>
> > "All the callers do this currently" isn't a reason to
> > change an assert. Possible reasons to change it include:
> >  * "X is required because if we don't then things break because Y"
>>  * "it is meaningless (a programming error) to do X, because Y"
> >
> > Can you give the reasoning for changing this assert?
> > Does it apply also to other add_watch hook functions?
> > Would the assert be better at a higher level in the callstack?
>
> ...that said, I've just figured out what your patch is trying
> to fix. I think that kind of makes the point about the commit
> message not really being very clear about why the change is
>being made, though. (Should we be checking
> '(cond & G_IO_OUT) != 0'? 
I think '(cond & G_IO_OUT) != 0' is better, v2 will be posted.

> Is this a bandaid over missing
> functionality in the spice chardriver?)
I really don't know about this.
> 
> -- PMM

      reply	other threads:[~2015-01-19  6:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-17  6:48 [Qemu-devel] [PATCH] spice-char: fix wrong assert condition Zhang Haoyu
2015-01-17 11:52 ` Peter Maydell
2015-01-17 11:54   ` Peter Maydell
2015-01-19  6:15     ` Zhang Haoyu [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=201501191415200853264@sangfor.com.cn \
    --to=zhanghy@sangfor.com.cn \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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).