[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_trans
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_translate_iommu() |
Date: |
Mon, 6 Jan 2020 15:24:12 -0300 |
Label 'success' can be replaced by 'return ret'.
As a bonus, existing trailing whitespaces were automatically
deleted by the text editor while making this patch.
CC: Richard Henderson <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
hw/alpha/typhoon.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index 179e1f7658..af992883c7 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -34,7 +34,7 @@ typedef struct TyphoonWindow {
uint64_t wsm;
uint64_t tba;
} TyphoonWindow;
-
+
typedef struct TyphoonPchip {
MemoryRegion region;
MemoryRegion reg_iack;
@@ -190,7 +190,7 @@ static MemTxResult cchip_read(void *opaque, hwaddr addr,
case 0x0780:
/* PWR: Power Management Control. */
break;
-
+
case 0x0c00: /* CMONCTLA */
case 0x0c40: /* CMONCTLB */
case 0x0c80: /* CMONCNT01 */
@@ -442,7 +442,7 @@ static MemTxResult cchip_write(void *opaque, hwaddr addr,
case 0x0780:
/* PWR: Power Management Control. */
break;
-
+
case 0x0c00: /* CMONCTLA */
case 0x0c40: /* CMONCTLB */
case 0x0c80: /* CMONCNT01 */
@@ -694,14 +694,14 @@ static IOMMUTLBEntry
typhoon_translate_iommu(IOMMUMemoryRegion *iommu,
/* Check the first three windows. */
for (i = 0; i < 3; ++i) {
if (window_translate(&pchip->win[i], addr, &ret)) {
- goto success;
+ return ret;
}
}
/* Check the fourth window for DAC disable. */
if ((pchip->win[3].wba & 0x80000000000ull) == 0
&& window_translate(&pchip->win[3], addr, &ret)) {
- goto success;
+ return ret;
}
} else {
/* Double-address cycle. */
@@ -711,7 +711,7 @@ static IOMMUTLBEntry
typhoon_translate_iommu(IOMMUMemoryRegion *iommu,
if (pchip->ctl & 0x40) {
/* See 10.1.4.4; in particular <39:35> is ignored. */
make_iommu_tlbe(0, 0x007ffffffffull, &ret);
- goto success;
+ return ret;
}
}
@@ -723,16 +723,14 @@ static IOMMUTLBEntry
typhoon_translate_iommu(IOMMUMemoryRegion *iommu,
pte_addr = pchip->win[3].tba & 0x7ffc00000ull;
pte_addr |= (addr & 0xffffe000u) >> 10;
if (pte_translate(pte_addr, &ret)) {
- goto success;
+ return ret;
}
}
}
}
failure:
- ret = (IOMMUTLBEntry) { .perm = IOMMU_NONE };
- success:
- return ret;
+ return (IOMMUTLBEntry) { .perm = IOMMU_NONE };
}
static AddressSpace *typhoon_pci_dma_iommu(PCIBus *bus, void *opaque, int
devfn)
--
2.24.1
- [PATCH v1 42/59] i386/intel_iommu.c: remove unneeded labels, (continued)
- [PATCH v1 42/59] i386/intel_iommu.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 43/59] i386/amd_iommu.c: remove unneeded label in amdvi_int_remap_msi(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 44/59] 9p-local.c: remove unneeded label in local_unlinkat_common(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_translate_iommu(),
Daniel Henrique Barboza <=
- [PATCH v1 47/59] pvrdma_main.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 48/59] pvrdma_dev_ring.c: remove unneeded label in pvrdma_ring_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 49/59] rdma/rdma_rm.c: remove unneeded label in rdma_rm_alloc_pd(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 50/59] rdma/rdma_backend.c: remove unneeded label in rdma_backend_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 51/59] virtio/vhost.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 52/59] net/vhost_net.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 53/59] net/net_tx_pkt.c: remove unneeded label in net_tx_pkt_get_gso_type(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 55/59] linux-user/flatload.c: remove unused 'out' label, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 56/59] linux-user/signal.c: remove unneeded label in do_sigaltstack(), Daniel Henrique Barboza, 2020/01/06