[PATCH 1/3] hw/pci-host/designware: Remove unused include

Bernhard Beschow posted 3 patches 6 months, 2 weeks ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Andrey Smirnov <andrew.smirnov@gmail.com>
[PATCH 1/3] hw/pci-host/designware: Remove unused include
Posted by Bernhard Beschow 6 months, 2 weeks ago
The DEFINE_TYPES() macro doesn't need the qemu/module.h include.

Fixes: 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM types using
DEFINE_TYPES() macro")
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 hw/pci-host/designware.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index 183f838392..b4bff14579 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "qemu/module.h"
 #include "qemu/log.h"
 #include "qemu/bitops.h"
 #include "hw/pci/msi.h"
-- 
2.49.0
Re: [PATCH 1/3] hw/pci-host/designware: Remove unused include
Posted by Philippe Mathieu-Daudé 6 months, 2 weeks ago
On 1/5/25 20:34, Bernhard Beschow wrote:
> The DEFINE_TYPES() macro doesn't need the qemu/module.h include.
> 
> Fixes: 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM types using
> DEFINE_TYPES() macro")

The 'Fixes:' tag is for bug being fixed. Here I suggest:

   Since commit 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM
   types using DEFINE_TYPES() macro") which removed the type_init() use,
   we don't need to include "qemu/module.h" anymore.

(I can do the update when applying if you agree).

> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> ---
>   hw/pci-host/designware.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
> index 183f838392..b4bff14579 100644
> --- a/hw/pci-host/designware.c
> +++ b/hw/pci-host/designware.c
> @@ -20,7 +20,6 @@
>   
>   #include "qemu/osdep.h"
>   #include "qapi/error.h"
> -#include "qemu/module.h"
>   #include "qemu/log.h"
>   #include "qemu/bitops.h"
>   #include "hw/pci/msi.h"

$ git grep -L type_init $(git grep -l qemu/module.h hw) | wc -l
       50

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


Re: [PATCH 1/3] hw/pci-host/designware: Remove unused include
Posted by Peter Maydell 6 months, 1 week ago
On Thu, 1 May 2025 at 20:02, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 1/5/25 20:34, Bernhard Beschow wrote:
> > The DEFINE_TYPES() macro doesn't need the qemu/module.h include.
> >
> > Fixes: 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM types using
> > DEFINE_TYPES() macro")
>
> The 'Fixes:' tag is for bug being fixed.

No, Fixes: is for indicating the commit being fixed, so this
commit message is fine. We use Resolves: for gitlab bug URLs (though
gitlab itself will parse a URL out of a Fixes: tag too).

We mention this in

https://www.qemu.org/docs/master/devel/submitting-a-patch.html#write-a-meaningful-commit-message

with an example of use.

thanks
-- PMM
Re: [PATCH 1/3] hw/pci-host/designware: Remove unused include
Posted by BALATON Zoltan 6 months, 2 weeks ago
On Thu, 1 May 2025, Philippe Mathieu-Daudé wrote:
> On 1/5/25 20:34, Bernhard Beschow wrote:
>> The DEFINE_TYPES() macro doesn't need the qemu/module.h include.
>> 
>> Fixes: 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM types using
>> DEFINE_TYPES() macro")
>
> The 'Fixes:' tag is for bug being fixed. Here I suggest:

Wasn't that Resolves: that's used for bugs or Buglink: and Fixes: to 
refer to commits this fixes up? I thought we used Fixes: like that until 
now.

Regards,
BALATON Zoltan

>  Since commit 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM
>  types using DEFINE_TYPES() macro") which removed the type_init() use,
>  we don't need to include "qemu/module.h" anymore.
>
> (I can do the update when applying if you agree).
>
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>> ---
>>   hw/pci-host/designware.c | 1 -
>>   1 file changed, 1 deletion(-)
>> 
>> diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
>> index 183f838392..b4bff14579 100644
>> --- a/hw/pci-host/designware.c
>> +++ b/hw/pci-host/designware.c
>> @@ -20,7 +20,6 @@
>>     #include "qemu/osdep.h"
>>   #include "qapi/error.h"
>> -#include "qemu/module.h"
>>   #include "qemu/log.h"
>>   #include "qemu/bitops.h"
>>   #include "hw/pci/msi.h"
>
> $ git grep -L type_init $(git grep -l qemu/module.h hw) | wc -l
>      50
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
>
>
Re: [PATCH 1/3] hw/pci-host/designware: Remove unused include
Posted by Bernhard Beschow 6 months, 2 weeks ago

Am 1. Mai 2025 19:02:35 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>On 1/5/25 20:34, Bernhard Beschow wrote:
>> The DEFINE_TYPES() macro doesn't need the qemu/module.h include.
>> 
>> Fixes: 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM types using
>> DEFINE_TYPES() macro")
>
>The 'Fixes:' tag is for bug being fixed.

I see. Thanks for clarifying!

>Here I suggest:
>
>  Since commit 13a07eb146c8 ("hw/pci-host/designware: Declare CPU QOM
>  types using DEFINE_TYPES() macro") which removed the type_init() use,
>  we don't need to include "qemu/module.h" anymore.
>
>(I can do the update when applying if you agree).

Fine with me!

Best regards,
Bernhard

>
>> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
>> ---
>>   hw/pci-host/designware.c | 1 -
>>   1 file changed, 1 deletion(-)
>> 
>> diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
>> index 183f838392..b4bff14579 100644
>> --- a/hw/pci-host/designware.c
>> +++ b/hw/pci-host/designware.c
>> @@ -20,7 +20,6 @@
>>     #include "qemu/osdep.h"
>>   #include "qapi/error.h"
>> -#include "qemu/module.h"
>>   #include "qemu/log.h"
>>   #include "qemu/bitops.h"
>>   #include "hw/pci/msi.h"
>
>$ git grep -L type_init $(git grep -l qemu/module.h hw) | wc -l
>      50
>
>Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>