[Qemu-devel] [PATCH] hw: edu: drop DO_UPCAST

Li Qiang posted 1 patch 7 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181013055103.51451-1-liq3ea@163.com
Test docker-clang@ubuntu passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
hw/misc/edu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Qemu-devel] [PATCH] hw: edu: drop DO_UPCAST
Posted by Li Qiang 7 years ago
Signed-off-by: Li Qiang <liq3ea@163.com>
---
 hw/misc/edu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index 0687ffd343..cdcf550dd7 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -342,7 +342,7 @@ static void *edu_fact_thread(void *opaque)
 
 static void pci_edu_realize(PCIDevice *pdev, Error **errp)
 {
-    EduState *edu = DO_UPCAST(EduState, pdev, pdev);
+    EduState *edu = EDU(pdev);
     uint8_t *pci_conf = pdev->config;
 
     pci_config_set_interrupt_pin(pci_conf, 1);
@@ -365,7 +365,7 @@ static void pci_edu_realize(PCIDevice *pdev, Error **errp)
 
 static void pci_edu_uninit(PCIDevice *pdev)
 {
-    EduState *edu = DO_UPCAST(EduState, pdev, pdev);
+    EduState *edu = EDU(pdev);
 
     qemu_mutex_lock(&edu->thr_mutex);
     edu->stopping = true;
-- 
2.17.1



Re: [Qemu-devel] [PATCH] hw: edu: drop DO_UPCAST
Posted by Paolo Bonzini 7 years ago
On 13/10/2018 07:51, Li Qiang wrote:
> Signed-off-by: Li Qiang <liq3ea@163.com>
> ---
>  hw/misc/edu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/misc/edu.c b/hw/misc/edu.c
> index 0687ffd343..cdcf550dd7 100644
> --- a/hw/misc/edu.c
> +++ b/hw/misc/edu.c
> @@ -342,7 +342,7 @@ static void *edu_fact_thread(void *opaque)
>  
>  static void pci_edu_realize(PCIDevice *pdev, Error **errp)
>  {
> -    EduState *edu = DO_UPCAST(EduState, pdev, pdev);
> +    EduState *edu = EDU(pdev);
>      uint8_t *pci_conf = pdev->config;
>  
>      pci_config_set_interrupt_pin(pci_conf, 1);
> @@ -365,7 +365,7 @@ static void pci_edu_realize(PCIDevice *pdev, Error **errp)
>  
>  static void pci_edu_uninit(PCIDevice *pdev)
>  {
> -    EduState *edu = DO_UPCAST(EduState, pdev, pdev);
> +    EduState *edu = EDU(pdev);
>  
>      qemu_mutex_lock(&edu->thr_mutex);
>      edu->stopping = true;
> 

Queued, thanks.

Paolo