qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ide: coding style fix


From: Pavel Butsykin
Subject: [Qemu-devel] [PATCH] ide: coding style fix
Date: Tue, 12 Apr 2016 15:53:14 +0300

Signed-off-by: Pavel Butsykin <address@hidden>
---
 hw/ide/internal.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index eb006c2..d2c458f 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -338,7 +338,7 @@ enum ide_dma_cmd {
     IDE_DMA_READ,
     IDE_DMA_WRITE,
     IDE_DMA_TRIM,
-    IDE_DMA_ATAPI
+    IDE_DMA_ATAPI,
 };
 
 #define ide_cmd_is_read(s) \
@@ -507,6 +507,7 @@ struct IDEDevice {
 };
 
 /* These are used for the error_status field of IDEBus */
+#define IDE_RETRY_MASK 0xf8
 #define IDE_RETRY_DMA  0x08
 #define IDE_RETRY_PIO  0x10
 #define IDE_RETRY_ATAPI 0x20 /* reused IDE_RETRY_READ bit */
@@ -526,9 +527,7 @@ struct IDEDevice {
  * impossible bit combination as a new status value.
  */
 #define IS_IDE_RETRY_ATAPI(_status)   \
-    (((_status) & IDE_RETRY_ATAPI) && \
-     !IS_IDE_RETRY_DMA(_status) &&    \
-     !IS_IDE_RETRY_PIO(_status))
+    (((_status) & IDE_RETRY_MASK) == IDE_RETRY_ATAPI)
 
 static inline uint8_t ide_dma_cmd_to_retry(uint8_t dma_cmd)
 {
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]