From: John Snow <jsnow@redhat.com>
To: Li Qiang <liq3ea@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
QEMU Trivial <qemu-trivial@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] ide: piix: convert constant device name to MACRO
Date: Wed, 10 Oct 2018 12:40:35 -0400 [thread overview]
Message-ID: <ea51c064-d7e8-5e97-e7be-e70b6f69b5ca@redhat.com> (raw)
In-Reply-To: <1539145764-5730-1-git-send-email-liq3ea@gmail.com>
On 10/10/2018 12:29 AM, Li Qiang wrote:
> Signed-off-by: Li Qiang <liq3ea@gmail.com>
> ---
> hw/ide/piix.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index a3afe1f..5f29cce 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -35,6 +35,10 @@
> #include "hw/ide/pci.h"
> #include "trace.h"
>
> +#define TYPE_PIIX3_IDE "piix3-ide"
> +#define TYPE_PIIX3_IDE_XEN "piix3-ide-xen"
> +#define TYPE_PIIX4_IDE "piix4-ide"
> +
> static uint64_t bmdma_read(void *opaque, hwaddr addr, unsigned size)
> {
> BMDMAState *bm = opaque;
> @@ -204,7 +208,7 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
> {
> PCIDevice *dev;
>
> - dev = pci_create_simple(bus, devfn, "piix3-ide-xen");
> + dev = pci_create_simple(bus, devfn, TYPE_PIIX3_IDE_XEN);
> pci_ide_create_devs(dev, hd_table);
> return dev;
> }
> @@ -226,7 +230,7 @@ PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
> {
> PCIDevice *dev;
>
> - dev = pci_create_simple(bus, devfn, "piix3-ide");
> + dev = pci_create_simple(bus, devfn, TYPE_PIIX3_IDE);
> pci_ide_create_devs(dev, hd_table);
> return dev;
> }
> @@ -237,7 +241,7 @@ PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
> {
> PCIDevice *dev;
>
> - dev = pci_create_simple(bus, devfn, "piix4-ide");
> + dev = pci_create_simple(bus, devfn, TYPE_PIIX4_IDE);
> pci_ide_create_devs(dev, hd_table);
> return dev;
> }
> @@ -257,13 +261,13 @@ static void piix3_ide_class_init(ObjectClass *klass, void *data)
> }
>
> static const TypeInfo piix3_ide_info = {
> - .name = "piix3-ide",
> + .name = TYPE_PIIX3_IDE,
> .parent = TYPE_PCI_IDE,
> .class_init = piix3_ide_class_init,
> };
>
> static const TypeInfo piix3_ide_xen_info = {
> - .name = "piix3-ide-xen",
> + .name = TYPE_PIIX3_IDE_XEN,
> .parent = TYPE_PCI_IDE,
> .class_init = piix3_ide_class_init,
> };
> @@ -283,7 +287,7 @@ static void piix4_ide_class_init(ObjectClass *klass, void *data)
> }
>
> static const TypeInfo piix4_ide_info = {
> - .name = "piix4-ide",
> + .name = TYPE_PIIX4_IDE,
> .parent = TYPE_PCI_IDE,
> .class_init = piix4_ide_class_init,
> };
>
Reviewed-by: John Snow <jsnow@redhat.com>
Sure thing. This can actually go through the trivial queue:
Acked-by: John Snow <jsnow@redhat.com>
CC'd qemu-trivial.
--js
prev parent reply other threads:[~2018-10-10 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 4:29 [Qemu-devel] [PATCH] ide: piix: convert constant device name to MACRO Li Qiang
2018-10-10 16:40 ` John Snow [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=ea51c064-d7e8-5e97-e7be-e70b6f69b5ca@redhat.com \
--to=jsnow@redhat.com \
--cc=liq3ea@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).