[PATCH-for-5.2] stubs/cmos: Use correct include

Philippe Mathieu-Daudé posted 1 patch 3 years, 9 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200724084315.1606-1-f4bug@amsat.org
stubs/cmos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH-for-5.2] stubs/cmos: Use correct include
Posted by Philippe Mathieu-Daudé 3 years, 9 months ago
cmos_get_fd_drive_type() is declared in "hw/block/fdc.h".
This currently works because "hw/i386/pc.h" happens to
include it. Simplify including the correct header.

Fixes: 2055dbc1c9 ("acpi: move aml builder code for floppy device")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 stubs/cmos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stubs/cmos.c b/stubs/cmos.c
index 416cbe4055..3fdbae2c69 100644
--- a/stubs/cmos.c
+++ b/stubs/cmos.c
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "hw/i386/pc.h"
+#include "hw/block/fdc.h"
 
 int cmos_get_fd_drive_type(FloppyDriveType fd0)
 {
-- 
2.21.3


Re: [PATCH-for-5.2] stubs/cmos: Use correct include
Posted by John Snow 3 years, 9 months ago
On 7/24/20 4:43 AM, Philippe Mathieu-Daudé wrote:
> cmos_get_fd_drive_type() is declared in "hw/block/fdc.h".
> This currently works because "hw/i386/pc.h" happens to
> include it. Simplify including the correct header.
> 
> Fixes: 2055dbc1c9 ("acpi: move aml builder code for floppy device")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: John Snow <jsnow@redhat.com>

> ---
>   stubs/cmos.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/stubs/cmos.c b/stubs/cmos.c
> index 416cbe4055..3fdbae2c69 100644
> --- a/stubs/cmos.c
> +++ b/stubs/cmos.c
> @@ -1,5 +1,5 @@
>   #include "qemu/osdep.h"
> -#include "hw/i386/pc.h"
> +#include "hw/block/fdc.h"
>   
>   int cmos_get_fd_drive_type(FloppyDriveType fd0)
>   {
> 


Re: [PATCH-for-5.2] stubs/cmos: Use correct include
Posted by Philippe Mathieu-Daudé 3 years, 8 months ago
ping?

On 7/24/20 10:43 AM, Philippe Mathieu-Daudé wrote:
> cmos_get_fd_drive_type() is declared in "hw/block/fdc.h".
> This currently works because "hw/i386/pc.h" happens to
> include it. Simplify including the correct header.
> 
> Fixes: 2055dbc1c9 ("acpi: move aml builder code for floppy device")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  stubs/cmos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/stubs/cmos.c b/stubs/cmos.c
> index 416cbe4055..3fdbae2c69 100644
> --- a/stubs/cmos.c
> +++ b/stubs/cmos.c
> @@ -1,5 +1,5 @@
>  #include "qemu/osdep.h"
> -#include "hw/i386/pc.h"
> +#include "hw/block/fdc.h"
>  
>  int cmos_get_fd_drive_type(FloppyDriveType fd0)
>  {
> 

Re: [PATCH-for-5.2] stubs/cmos: Use correct include
Posted by Laurent Vivier 3 years, 8 months ago
Le 24/07/2020 à 10:43, Philippe Mathieu-Daudé a écrit :
> cmos_get_fd_drive_type() is declared in "hw/block/fdc.h".
> This currently works because "hw/i386/pc.h" happens to
> include it. Simplify including the correct header.
> 
> Fixes: 2055dbc1c9 ("acpi: move aml builder code for floppy device")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  stubs/cmos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/stubs/cmos.c b/stubs/cmos.c
> index 416cbe4055..3fdbae2c69 100644
> --- a/stubs/cmos.c
> +++ b/stubs/cmos.c
> @@ -1,5 +1,5 @@
>  #include "qemu/osdep.h"
> -#include "hw/i386/pc.h"
> +#include "hw/block/fdc.h"
>  
>  int cmos_get_fd_drive_type(FloppyDriveType fd0)
>  {
> 

Applied to my trivial-patches branch.

Thanks,
Laurent