From: "Andreas Färber" <afaerber@suse.de>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/2] virtio-serial-port: Convert to QOM realize/unrealize
Date: Wed, 12 Mar 2014 20:03:15 +0100 [thread overview]
Message-ID: <5320AF73.7020500@suse.de> (raw)
In-Reply-To: <20140312124126.GC24378@grmbl.mre>
Hi Amit,
Am 12.03.2014 13:41, schrieb Amit Shah:
> Hi,
>
> I haven't really followed the whole discussion, so can't say much
> about it -- overall looks alright. A couple of minor nits:
>
>> max_nr_ports = tswap32(port->vser->config.max_nr_ports);
>> if (port->id >= max_nr_ports) {
>> - error_report("virtio-serial-bus: Out-of-range port id specified, max. allowed: %u",
>> - max_nr_ports - 1);
>> - return -1;
>> + error_setg(errp, "virtio-serial-bus: Out-of-range port id specified, "
>> + "max. allowed: %u",
>> + max_nr_ports - 1);
>
> indentation looks off. Just put this last line on the line above?
Done. (Was intentional to align error string, but no need to keep on
separate lines after breaking.)
>
>> diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h
>> index 1d2040b..b1bc9e5 100644
>> --- a/include/hw/virtio/virtio-serial.h
>> +++ b/include/hw/virtio/virtio-serial.h
>> @@ -77,19 +77,19 @@ typedef struct VirtIOSerialPort VirtIOSerialPort;
>> typedef struct VirtIOSerialPortClass {
>> DeviceClass parent_class;
>>
>> - /* Is this a device that binds with hvc in the guest? */
>> - bool is_console;
>> -
>> /*
>> - * The per-port (or per-app) init function that's called when a
>> + * The per-port (or per-app) realize function that's called when a
>> * new device is found on the bus.
>> */
>> - int (*init)(VirtIOSerialPort *port);
>> + DeviceRealize realize;
>> /*
>> - * Per-port exit function that's called when a port gets
>> + * Per-port unrealize function that's called when a port gets
>> * hot-unplugged or removed.
>> */
>> - int (*exit)(VirtIOSerialPort *port);
>> + DeviceUnrealize unrealize;
>> +
>> + /* Is this a device that binds with hvc in the guest? */
>> + bool is_console;
>
> is_console is moved unnecessarily?
Fixed. (Previously fields parent_realize were added right after parent_obj.)
Thanks,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2014-03-12 19:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 17:37 [Qemu-devel] [PATCH v3 0/2] QOM realize for virtio-console Andreas Färber
2014-03-10 17:37 ` [Qemu-devel] [PATCH v3 1/2] virtio-console: QOM cast cleanup for VirtConsole Andreas Färber
2014-03-10 17:37 ` [Qemu-devel] [PATCH v3 2/2] virtio-serial-port: Convert to QOM realize/unrealize Andreas Färber
2014-03-12 12:41 ` Amit Shah
2014-03-12 19:03 ` Andreas Färber [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=5320AF73.7020500@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=amit.shah@redhat.com \
--cc=mst@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).