[haiku-commits] Change in haiku[master]: hda: Style cleanup only, no functional change.

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 22 Jul 2020 21:34:59 +0000

From Michael Lotz <mmlr@xxxxxxxx>:

Michael Lotz has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3064 ;)


Change subject: hda: Style cleanup only, no functional change.
......................................................................

hda: Style cleanup only, no functional change.
---
M src/add-ons/kernel/drivers/audio/hda/driver.cpp
M src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
2 files changed, 11 insertions(+), 9 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/64/3064/1

diff --git a/src/add-ons/kernel/drivers/audio/hda/driver.cpp 
b/src/add-ons/kernel/drivers/audio/hda/driver.cpp
index 4dd2688..15df71d 100644
--- a/src/add-ons/kernel/drivers/audio/hda/driver.cpp
+++ b/src/add-ons/kernel/drivers/audio/hda/driver.cpp
@@ -84,8 +84,9 @@
        }

        if (get_module(B_PCI_X86_MODULE_NAME, (module_info**)&gPCIx86Module)
-                       != B_OK)
+                       != B_OK) {
                gPCIx86Module = NULL;
+       }

        return B_OK;
 }
@@ -118,9 +119,8 @@
        static const char* devs[MAX_CARDS + 1];
        uint32 i;

-       for (i = 0; i < gNumCards; i++) {
+       for (i = 0; i < gNumCards; i++)
                devs[i] = gCards[i].devfs_path;
-       }

        devs[i] = NULL;

diff --git a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp 
b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
index 4febf7f..207144a 100644
--- a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
+++ b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
@@ -435,8 +435,10 @@
                }

                // stop DMA
-               controller->ReadModifyWrite8(HDAC_CORB_CONTROL, 
HDAC_CORB_CONTROL_MASK, 0);
-               controller->ReadModifyWrite8(HDAC_RIRB_CONTROL, 
HDAC_RIRB_CONTROL_MASK, 0);
+               controller->ReadModifyWrite8(HDAC_CORB_CONTROL, 
HDAC_CORB_CONTROL_MASK,
+                       0);
+               controller->ReadModifyWrite8(HDAC_RIRB_CONTROL, 
HDAC_RIRB_CONTROL_MASK,
+                       0);

                if (!wait_for_bits<8>(controller, HDAC_CORB_CONTROL, ~0, false)
                        || !wait_for_bits<8>(controller, HDAC_RIRB_CONTROL, ~0, 
false)) {
@@ -1039,7 +1041,7 @@
        uint16 stateStatus;
        uint16 cmd;
        status_t status;
-       const pci_info& pciInfo = controller->pci_info;
+       const pci_info& pciInfo = controller->pci_info;
        uint32 quirks = get_controller_quirks(pciInfo);

        // map the registers (low + high for 64-bit when requested)
@@ -1058,7 +1060,7 @@
                goto error;
        }

-       cmd = (gPci->read_pci_config)(pciInfo.bus, pciInfo.device, 
pciInfo.function,
+       cmd = gPci->read_pci_config(pciInfo.bus, pciInfo.device, 
pciInfo.function,
                PCI_command, 2);
        if (!(cmd & PCI_command_master)) {
                dprintf("hda: enabling PCI bus mastering\n");
@@ -1068,8 +1070,8 @@
                dprintf("hda: enabling PCI memory access\n");
                cmd |= PCI_command_memory;
        }
-       (gPci->write_pci_config)(pciInfo.bus, pciInfo.device, pciInfo.function,
-                       PCI_command, 2, cmd);
+       gPci->write_pci_config(pciInfo.bus, pciInfo.device, pciInfo.function,
+               PCI_command, 2, cmd);

        // Disable interrupt generation
        controller->Write32(HDAC_INTR_CONTROL, 0);

--
To view, visit https://review.haiku-os.org/c/haiku/+/3064
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Id36bf67a51369099093ae24412fa681f88c4c8d0
Gerrit-Change-Number: 3064
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Lotz <mmlr@xxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: hda: Style cleanup only, no functional change. - Gerrit