diff mbox

ide: coding style fix

Message ID 1460465594-15777-1-git-send-email-pbutsykin@virtuozzo.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Butsykin April 12, 2016, 12:53 p.m. UTC
Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
---
 hw/ide/internal.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox

Patch

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)
 {