From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, anthony perard <anthony.perard@citrix.com>,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/3] char: fix alias devices regression
Date: Thu, 8 Jun 2017 03:16:26 -0400 (EDT) [thread overview]
Message-ID: <139132138.31602801.1496906186264.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <87o9tzj6p1.fsf@dusky.pond.sub.org>
Hi
----- Original Message -----
> Marc-André Lureau <marcandre.lureau@redhat.com> writes:
>
> > Fix regression from commit 4d43a603c71, where the serial and parallel
> > headers got removed from char.c, which broke the alias table.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > chardev/char.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/chardev/char.c b/chardev/char.c
> > index 7aa0210765..f38fac5c6b 100644
> > --- a/chardev/char.c
> > +++ b/chardev/char.c
> > @@ -34,6 +34,8 @@
> > #include "qemu/help_option.h"
> >
> > #include "chardev/char-mux.h"
> > +#include "chardev/char-parallel.h" /* for HAVE_CHARDEV_PARPORT */
> > +#include "chardev/char-serial.h" /* for HAVE_CHARDEV_SERIAL */
> >
> > /***********************************************************/
> > /* character device */
>
> Two drive-by observations:
>
> * Putting HAVE_FOOs in random headers, then testing them with #ifdef is
> asking for trouble. Anything you test with #ifdef should be there
> after #include "qemu/osdep.h" at the latest, or be defined in the same
> .c.
>
I agree, is it fine to move those HAVE_FOO there?
> * Such comments after #include rot quickly. Strong dislike.
Well, if that comment would have been there, there would have been less chance to remove the header by mistake, even if it rotted.
next prev parent reply other threads:[~2017-06-08 7:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 18:49 [Qemu-devel] [PATCH 0/3] char: fix chardev aliases regression Marc-André Lureau
2017-06-07 18:49 ` [Qemu-devel] [PATCH 1/3] char: fix alias devices regression Marc-André Lureau
2017-06-08 7:10 ` Markus Armbruster
2017-06-08 7:16 ` Marc-André Lureau [this message]
2017-06-08 8:15 ` Markus Armbruster
2017-06-07 18:49 ` [Qemu-devel] [PATCH 2/3] chardev: don't use alias names in parse_compat() Marc-André Lureau
2017-06-07 18:49 ` [Qemu-devel] [PATCH 3/3] test-char: start a /char/serial test Marc-André Lureau
2017-06-07 21:28 ` [Qemu-devel] [PATCH 0/3] char: fix chardev aliases regression Eric Blake
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=139132138.31602801.1496906186264.JavaMail.zimbra@redhat.com \
--to=marcandre.lureau@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--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).