Patchwork [v2,1/3] nvme: use TYPE_NVME instead of constant string

login
register
mail settings
Submitter Li Qiang
Date Jan. 11, 2019, 2:08 a.m.
Message ID <20190111020849.22674-2-liq3ea@gmail.com>
Download mbox | patch
Permalink /patch/697395/
State New
Headers show

Comments

Li Qiang - Jan. 11, 2019, 2:08 a.m.
Signed-off-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
 hw/block/nvme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Philippe Mathieu-Daudé - Jan. 14, 2019, 11:08 a.m.
On 1/11/19 3:08 AM, Li Qiang wrote:
> Signed-off-by: Li Qiang <liq3ea@gmail.com>
> Reviewed-by: Max Reitz <mreitz@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  hw/block/nvme.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/block/nvme.c b/hw/block/nvme.c
> index 7c8c63e8f5..f206391e8e 100644
> --- a/hw/block/nvme.c
> +++ b/hw/block/nvme.c
> @@ -1381,7 +1381,7 @@ static void nvme_instance_init(Object *obj)
>  }
>  
>  static const TypeInfo nvme_info = {
> -    .name          = "nvme",
> +    .name          = TYPE_NVME,
>      .parent        = TYPE_PCI_DEVICE,
>      .instance_size = sizeof(NvmeCtrl),
>      .class_init    = nvme_class_init,
>

Patch

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 7c8c63e8f5..f206391e8e 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -1381,7 +1381,7 @@  static void nvme_instance_init(Object *obj)
 }
 
 static const TypeInfo nvme_info = {
-    .name          = "nvme",
+    .name          = TYPE_NVME,
     .parent        = TYPE_PCI_DEVICE,
     .instance_size = sizeof(NvmeCtrl),
     .class_init    = nvme_class_init,