qemu-trivial
[Top][All Lists]
Advanced

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

[PATCH 03/10] hw/ide/:split some lines containing more than 80 character


From: Gan Qixin
Subject: [PATCH 03/10] hw/ide/:split some lines containing more than 80 characters
Date: Tue, 20 Oct 2020 04:30:16 +0800

By using scripts/checkpatch.pl, it is found that many files in hw/ide/
contain lines with more than 80 characters.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
 hw/ide/ahci.c   | 10 ++++++----
 hw/ide/atapi.c  |  9 +++++----
 hw/ide/cmd646.c |  3 ++-
 hw/ide/core.c   | 21 ++++++++++++++-------
 hw/ide/piix.c   |  3 ++-
 hw/ide/via.c    |  3 ++-
 6 files changed, 31 insertions(+), 18 deletions(-)

diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 680304a24c..83bbc7e3df 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1252,7 +1252,8 @@ static void handle_reg_h2d_fis(AHCIState *s, int port,
     if (opts & AHCI_CMD_ATAPI) {
         memcpy(ide_state->io_buffer, &cmd_fis[AHCI_COMMAND_TABLE_ACMD], 0x10);
         if (trace_event_get_state_backends(TRACE_HANDLE_REG_H2D_FIS_DUMP)) {
-            char *pretty_fis = ahci_pretty_buffer_fis(ide_state->io_buffer, 
0x10);
+            char *pretty_fis = ahci_pretty_buffer_fis(ide_state->io_buffer,
+                                                      0x10);
             trace_handle_reg_h2d_fis_dump(s, port, pretty_fis);
             g_free(pretty_fis);
         }
@@ -1356,9 +1357,10 @@ static void ahci_pio_transfer(const IDEDMA *dma)
      * The device only sets the 'I' bit in the PIO Setup FIS for device->host
      * requests (see "DPIOI1" in the SATA spec), or for host->device DRQs after
      * the first (see "DPIOO1").  The latter is consistent with the spec's
-     * description of the PACKET protocol, where the command part of ATAPI 
requests
-     * ("DPKT0") has the 'I' bit clear, while the data part of PIO ATAPI 
requests
-     * ("DPKT4a" and "DPKT7") has the 'I' bit set for both directions for all 
DRQs.
+     * description of the PACKET protocol, where the command part of ATAPI
+     * requests ("DPKT0") has the 'I' bit clear, while the data part of PIO
+     * ATAPI requests ("DPKT4a" and "DPKT7") has the 'I' bit set for both
+     * directions for all DRQs.
      */
     pio_fis_i = ad->done_first_drq || (!is_atapi && !is_write);
     ahci_write_fis_pio(ad, size, pio_fis_i);
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 14a2b0bb2f..7f346d5d2a 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -378,7 +378,8 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret)
 
     if (s->packet_transfer_size <= 0) {
         s->status = READY_STAT | SEEK_STAT;
-        s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | 
ATAPI_INT_REASON_CD;
+        s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO |
+                      ATAPI_INT_REASON_CD;
         ide_set_irq(s->bus);
         goto eot;
     }
@@ -1232,9 +1233,9 @@ enum {
     ALLOW_UA = 0x01,
 
     /*
-     * Commands flagged with CHECK_READY can only execute if a medium is 
present.
-     * Otherwise they report the Not Ready Condition. (See MMC-5, section
-     * 4.1.8)
+     * Commands flagged with CHECK_READY can only execute if a medium is
+     * present. Otherwise they report the Not Ready Condition. (See MMC-5,
+     * section 4.1.8)
      */
     CHECK_READY = 0x02,
 
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index c254631485..c41990f393 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -144,7 +144,8 @@ static void bmdma_write(void *opaque, hwaddr addr,
         cmd646_update_irq(pci_dev);
         break;
     case 2:
-        bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 
0x06);
+        bm->status = (val & 0x60) | (bm->status & 1) |
+                     (bm->status & ~val & 0x06);
         break;
     case 3:
         if (bm == &bm->pci_dev->bmdma[0]) {
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 693b352d5e..b784fff88f 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2017,7 +2017,8 @@ static const struct {
     [WIN_READ_ONCE]               = { cmd_read_pio, HD_CFA_OK },
     [WIN_READ_EXT]                = { cmd_read_pio, HD_CFA_OK },
     [WIN_READDMA_EXT]             = { cmd_read_dma, HD_CFA_OK },
-    [WIN_READ_NATIVE_MAX_EXT]     = { cmd_read_native_max, HD_CFA_OK | SET_DSC 
},
+    [WIN_READ_NATIVE_MAX_EXT]     = { cmd_read_native_max, HD_CFA_OK |
+                                      SET_DSC },
     [WIN_MULTREAD_EXT]            = { cmd_read_multiple, HD_CFA_OK },
     [WIN_WRITE]                   = { cmd_write_pio, HD_CFA_OK },
     [WIN_WRITE_ONCE]              = { cmd_write_pio, HD_CFA_OK },
@@ -2037,7 +2038,8 @@ static const struct {
     [WIN_IDLEIMMEDIATE2]          = { cmd_nop, HD_CFA_OK },
     [WIN_STANDBY2]                = { cmd_nop, HD_CFA_OK },
     [WIN_SETIDLE2]                = { cmd_nop, HD_CFA_OK },
-    [WIN_CHECKPOWERMODE2]         = { cmd_check_power_mode, HD_CFA_OK | 
SET_DSC },
+    [WIN_CHECKPOWERMODE2]         = { cmd_check_power_mode, HD_CFA_OK |
+                                      SET_DSC },
     [WIN_SLEEPNOW2]               = { cmd_nop, HD_CFA_OK },
     [WIN_PACKETCMD]               = { cmd_packet, CD_OK },
     [WIN_PIDENTIFY]               = { cmd_identify_packet, CD_OK },
@@ -2046,7 +2048,8 @@ static const struct {
     [CFA_ERASE_SECTORS]           = { cmd_cfa_erase_sectors, CFA_OK | SET_DSC 
},
     [WIN_MULTREAD]                = { cmd_read_multiple, HD_CFA_OK },
     [WIN_MULTWRITE]               = { cmd_write_multiple, HD_CFA_OK },
-    [WIN_SETMULT]                 = { cmd_set_multiple_mode, HD_CFA_OK | 
SET_DSC },
+    [WIN_SETMULT]                 = { cmd_set_multiple_mode, HD_CFA_OK |
+                                      SET_DSC },
     [WIN_READDMA]                 = { cmd_read_dma, HD_CFA_OK },
     [WIN_READDMA_ONCE]            = { cmd_read_dma, HD_CFA_OK },
     [WIN_WRITEDMA]                = { cmd_write_dma, HD_CFA_OK },
@@ -2056,15 +2059,19 @@ static const struct {
     [WIN_IDLEIMMEDIATE]           = { cmd_nop, HD_CFA_OK },
     [WIN_STANDBY]                 = { cmd_nop, HD_CFA_OK },
     [WIN_SETIDLE1]                = { cmd_nop, HD_CFA_OK },
-    [WIN_CHECKPOWERMODE1]         = { cmd_check_power_mode, HD_CFA_OK | 
SET_DSC },
+    [WIN_CHECKPOWERMODE1]         = { cmd_check_power_mode, HD_CFA_OK |
+                                      SET_DSC },
     [WIN_SLEEPNOW1]               = { cmd_nop, HD_CFA_OK },
     [WIN_FLUSH_CACHE]             = { cmd_flush_cache, ALL_OK },
     [WIN_FLUSH_CACHE_EXT]         = { cmd_flush_cache, HD_CFA_OK },
     [WIN_IDENTIFY]                = { cmd_identify, ALL_OK },
     [WIN_SETFEATURES]             = { cmd_set_features, ALL_OK | SET_DSC },
-    [IBM_SENSE_CONDITION]         = { cmd_ibm_sense_condition, CFA_OK | 
SET_DSC },
-    [CFA_WEAR_LEVEL]              = { cmd_cfa_erase_sectors, HD_CFA_OK | 
SET_DSC },
-    [WIN_READ_NATIVE_MAX]         = { cmd_read_native_max, HD_CFA_OK | SET_DSC 
},
+    [IBM_SENSE_CONDITION]         = { cmd_ibm_sense_condition, CFA_OK |
+                                      SET_DSC },
+    [CFA_WEAR_LEVEL]              = { cmd_cfa_erase_sectors, HD_CFA_OK |
+                                      SET_DSC },
+    [WIN_READ_NATIVE_MAX]         = { cmd_read_native_max, HD_CFA_OK |
+                                      SET_DSC },
 };
 
 static bool ide_cmd_permitted(IDEState *s, uint32_t cmd)
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index b402a93636..2b154d0344 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -75,7 +75,8 @@ static void bmdma_write(void *opaque, hwaddr addr,
         bmdma_cmd_writeb(bm, val);
         break;
     case 2:
-        bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 
0x06);
+        bm->status = (val & 0x60) | (bm->status & 1) |
+                     (bm->status & ~val & 0x06);
         break;
     }
 }
diff --git a/hw/ide/via.c b/hw/ide/via.c
index be09912b33..694d5e55a2 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -74,7 +74,8 @@ static void bmdma_write(void *opaque, hwaddr addr,
         bmdma_cmd_writeb(bm, val);
         break;
     case 2:
-        bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 
0x06);
+        bm->status = (val & 0x60) | (bm->status & 1) |
+                     (bm->status & ~val & 0x06);
         break;
     default:;
     }
-- 
2.23.0




reply via email to

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