[PATCH] hw/vfio: Drop superfluous inclusion of hw-error.h

Thomas Huth posted 1 patch 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260428163702.3224323-1-thuth@redhat.com
Maintainers: Alex Williamson <alex@shazbot.org>, "Cédric Le Goater" <clg@redhat.com>, Tomita Moeko <tomitamoeko@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>
hw/vfio/device.c      | 1 -
hw/vfio/helpers.c     | 1 -
hw/vfio/igd.c         | 1 -
hw/vfio/kvm-helpers.c | 1 -
4 files changed, 4 deletions(-)
[PATCH] hw/vfio: Drop superfluous inclusion of hw-error.h
Posted by Thomas Huth 1 month ago
From: Thomas Huth <thuth@redhat.com>

None of these files use the hw_error() function, so there is no
need to include hw-error.h here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/vfio/device.c      | 1 -
 hw/vfio/helpers.c     | 1 -
 hw/vfio/igd.c         | 1 -
 hw/vfio/kvm-helpers.c | 1 -
 4 files changed, 4 deletions(-)

diff --git a/hw/vfio/device.c b/hw/vfio/device.c
index 3ffd69a579b..ccf14743e95 100644
--- a/hw/vfio/device.c
+++ b/hw/vfio/device.c
@@ -24,7 +24,6 @@
 #include "hw/vfio/vfio-device.h"
 #include "hw/vfio/pci.h"
 #include "hw/core/iommu.h"
-#include "hw/core/hw-error.h"
 #include "trace.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
diff --git a/hw/vfio/helpers.c b/hw/vfio/helpers.c
index 65c6dba0428..c719864b92f 100644
--- a/hw/vfio/helpers.c
+++ b/hw/vfio/helpers.c
@@ -24,7 +24,6 @@
 
 #include "exec/cpu-common.h"
 #include "hw/vfio/vfio-device.h"
-#include "hw/core/hw-error.h"
 #include "qapi/error.h"
 #include "vfio-helpers.h"
 
diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index 6aacf27284f..e091f21b6a3 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -16,7 +16,6 @@
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
 #include "hw/core/boards.h"
-#include "hw/core/hw-error.h"
 #include "hw/nvram/fw_cfg.h"
 #include "pci.h"
 #include "pci-quirks.h"
diff --git a/hw/vfio/kvm-helpers.c b/hw/vfio/kvm-helpers.c
index d71c9590aaa..5e73dddc418 100644
--- a/hw/vfio/kvm-helpers.c
+++ b/hw/vfio/kvm-helpers.c
@@ -25,7 +25,6 @@
 #include "system/kvm.h"
 #include "exec/cpu-common.h"
 #include "hw/vfio/vfio-device.h"
-#include "hw/core/hw-error.h"
 #include "qapi/error.h"
 #include "vfio-helpers.h"
 
-- 
2.53.0
Re: [PATCH] hw/vfio: Drop superfluous inclusion of hw-error.h
Posted by Cédric Le Goater 3 weeks, 5 days ago
On 4/28/26 18:37, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> None of these files use the hw_error() function, so there is no
> need to include hw-error.h here.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   hw/vfio/device.c      | 1 -
>   hw/vfio/helpers.c     | 1 -
>   hw/vfio/igd.c         | 1 -
>   hw/vfio/kvm-helpers.c | 1 -
>   4 files changed, 4 deletions(-)
> 
> diff --git a/hw/vfio/device.c b/hw/vfio/device.c
> index 3ffd69a579b..ccf14743e95 100644
> --- a/hw/vfio/device.c
> +++ b/hw/vfio/device.c
> @@ -24,7 +24,6 @@
>   #include "hw/vfio/vfio-device.h"
>   #include "hw/vfio/pci.h"
>   #include "hw/core/iommu.h"
> -#include "hw/core/hw-error.h"
>   #include "trace.h"
>   #include "qapi/error.h"
>   #include "qemu/error-report.h"
> diff --git a/hw/vfio/helpers.c b/hw/vfio/helpers.c
> index 65c6dba0428..c719864b92f 100644
> --- a/hw/vfio/helpers.c
> +++ b/hw/vfio/helpers.c
> @@ -24,7 +24,6 @@
>   
>   #include "exec/cpu-common.h"
>   #include "hw/vfio/vfio-device.h"
> -#include "hw/core/hw-error.h"
>   #include "qapi/error.h"
>   #include "vfio-helpers.h"
>   
> diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
> index 6aacf27284f..e091f21b6a3 100644
> --- a/hw/vfio/igd.c
> +++ b/hw/vfio/igd.c
> @@ -16,7 +16,6 @@
>   #include "qapi/error.h"
>   #include "qapi/qmp/qerror.h"
>   #include "hw/core/boards.h"
> -#include "hw/core/hw-error.h"
>   #include "hw/nvram/fw_cfg.h"
>   #include "pci.h"
>   #include "pci-quirks.h"
> diff --git a/hw/vfio/kvm-helpers.c b/hw/vfio/kvm-helpers.c
> index d71c9590aaa..5e73dddc418 100644
> --- a/hw/vfio/kvm-helpers.c
> +++ b/hw/vfio/kvm-helpers.c
> @@ -25,7 +25,6 @@
>   #include "system/kvm.h"
>   #include "exec/cpu-common.h"
>   #include "hw/vfio/vfio-device.h"
> -#include "hw/core/hw-error.h"
>   #include "qapi/error.h"
>   #include "vfio-helpers.h"
>   


Applied to

     https://github.com/legoater/qemu vfio-next

Please base future contributions on this branch.

Thanks,

C.
Re: [PATCH] hw/vfio: Drop superfluous inclusion of hw-error.h
Posted by Peter Maydell 3 weeks, 4 days ago
On Mon, 4 May 2026 at 16:04, Cédric Le Goater <clg@redhat.com> wrote:
> On 4/28/26 18:37, Thomas Huth wrote:
> Applied to
>
>      https://github.com/legoater/qemu vfio-next
>
> Please base future contributions on this branch.

In general I think it's better if we don't have odd subsystem
specific requirements like this. The general assumption for
QEMU patches should be that they are based on the current
head-of-git. I don't want to have to remember that vfio
is weird if I'm doing a patch that touches more than one
part of the codebase. If you're accumulating so much
stuff in vfio-next that it's problematic to have new
patches based on head-of-git, then my feeling is that
you're not sending pullreqs regularly enough.

thanks
-- PMM
Re: [PATCH] hw/vfio: Drop superfluous inclusion of hw-error.h
Posted by Cédric Le Goater 3 weeks, 4 days ago
On 5/5/26 10:18, Peter Maydell wrote:
> On Mon, 4 May 2026 at 16:04, Cédric Le Goater <clg@redhat.com> wrote:
>> On 4/28/26 18:37, Thomas Huth wrote:
>> Applied to
>>
>>       https://github.com/legoater/qemu vfio-next
>>
>> Please base future contributions on this branch.
> 
> In general I think it's better if we don't have odd subsystem
> specific requirements like this. The general assumption for
> QEMU patches should be that they are based on the current
> head-of-git. 

ok

> I don't want to have to remember that vfio
> is weird if I'm doing a patch that touches more than one
> part of the codebase. If you're accumulating so much
> stuff in vfio-next that it's problematic to have new
> patches based on head-of-git, then my feeling is that
> you're not sending pullreqs regularly enough.

Fair enough.

I have had to deal with cases in the past where there were
ordering headaches. I agree we should promote using the HEAD
always.

I will remove that last sentence from my "applied" script.

Thanks,

C.


Re: [PATCH] hw/vfio: Drop superfluous inclusion of hw-error.h
Posted by Philippe Mathieu-Daudé 1 month ago
On 28/4/26 18:37, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> None of these files use the hw_error() function, so there is no
> need to include hw-error.h here.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   hw/vfio/device.c      | 1 -
>   hw/vfio/helpers.c     | 1 -
>   hw/vfio/igd.c         | 1 -
>   hw/vfio/kvm-helpers.c | 1 -
>   4 files changed, 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Re: [PATCH] hw/vfio: Drop superfluous inclusion of hw-error.h
Posted by Pierrick Bouvier 1 month ago
On 4/28/2026 9:37 AM, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> None of these files use the hw_error() function, so there is no
> need to include hw-error.h here.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/vfio/device.c      | 1 -
>  hw/vfio/helpers.c     | 1 -
>  hw/vfio/igd.c         | 1 -
>  hw/vfio/kvm-helpers.c | 1 -
>  4 files changed, 4 deletions(-)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>