OSDN Git Service

hw/ide/atapi: Restrict 'scsi/constants.h' inclusion
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 9 Feb 2023 22:35:21 +0000 (23:35 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 27 Feb 2023 21:29:02 +0000 (22:29 +0100)
Only atapi.c requires the SCSI constants. No need to include
it in all files including "hw/ide/internal.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230215112712.23110-7-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
hw/ide/atapi.c
include/hw/ide/internal.h

index 0a9aa6f..0c36bd0 100644 (file)
@@ -27,6 +27,7 @@
 #include "hw/ide/internal.h"
 #include "hw/scsi/scsi.h"
 #include "sysemu/block-backend.h"
+#include "scsi/constants.h"
 #include "trace.h"
 
 #define ATAPI_SECTOR_BITS (2 + BDRV_SECTOR_BITS)
index fc0aa81..29a8e79 100644 (file)
@@ -13,7 +13,6 @@
 #include "hw/isa/isa.h"
 #include "sysemu/dma.h"
 #include "hw/block/block.h"
-#include "scsi/constants.h"
 
 /* debug IDE devices */
 #define USE_DMA_CDROM