aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2018-03-23 15:32:02 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2018-05-20 08:48:13 +0300
commit4a4ff4c58fd750cde01c8b15d30d038cefc90a42 (patch)
tree663380d3786b808f7829236f2d085b437d4edb71 /hw/ppc
parentf23c81073a4f9aa41a3687161f6ca3d66501a280 (diff)
Remove unnecessary variables for function return value
Re-run Coccinelle script scripts/coccinelle/return_directly.cocci Signed-off-by: Laurent Vivier <lvivier@redhat.com> ppc part Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/pnv_lpc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c
index c42b4a8f6c..2317d1e62c 100644
--- a/hw/ppc/pnv_lpc.c
+++ b/hw/ppc/pnv_lpc.c
@@ -125,25 +125,17 @@ static int pnv_lpc_dt_xscom(PnvXScomInterface *dev, void *fdt, int xscom_offset)
static bool opb_read(PnvLpcController *lpc, uint32_t addr, uint8_t *data,
int sz)
{
- bool success;
-
/* XXX Handle access size limits and FW read caching here */
- success = !address_space_rw(&lpc->opb_as, addr, MEMTXATTRS_UNSPECIFIED,
- data, sz, false);
-
- return success;
+ return !address_space_rw(&lpc->opb_as, addr, MEMTXATTRS_UNSPECIFIED,
+ data, sz, false);
}
static bool opb_write(PnvLpcController *lpc, uint32_t addr, uint8_t *data,
int sz)
{
- bool success;
-
/* XXX Handle access size limits here */
- success = !address_space_rw(&lpc->opb_as, addr, MEMTXATTRS_UNSPECIFIED,
- data, sz, true);
-
- return success;
+ return !address_space_rw(&lpc->opb_as, addr, MEMTXATTRS_UNSPECIFIED,
+ data, sz, true);
}
#define ECCB_CTL_READ PPC_BIT(15)