From 4a4ff4c58fd750cde01c8b15d30d038cefc90a42 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 23 Mar 2018 15:32:02 +0100 Subject: Remove unnecessary variables for function return value Re-run Coccinelle script scripts/coccinelle/return_directly.cocci Signed-off-by: Laurent Vivier ppc part Acked-by: David Gibson Signed-off-by: Michael Tokarev --- target/xtensa/core-dc233c/xtensa-modules.inc.c | 56 +++++++------------------- 1 file changed, 14 insertions(+), 42 deletions(-) (limited to 'target/xtensa/core-dc233c/xtensa-modules.inc.c') diff --git a/target/xtensa/core-dc233c/xtensa-modules.inc.c b/target/xtensa/core-dc233c/xtensa-modules.inc.c index 7c20f82349..0f32f0804a 100644 --- a/target/xtensa/core-dc233c/xtensa-modules.inc.c +++ b/target/xtensa/core-dc233c/xtensa-modules.inc.c @@ -1817,9 +1817,7 @@ Operand_arr_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_arr_encode (uint32 *valp) { - int error; - error = (*valp & ~0xf) != 0; - return error; + return (*valp & ~0xf) != 0; } static int @@ -1831,9 +1829,7 @@ Operand_ars_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_ars_encode (uint32 *valp) { - int error; - error = (*valp & ~0xf) != 0; - return error; + return (*valp & ~0xf) != 0; } static int @@ -1845,9 +1841,7 @@ Operand_art_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_art_encode (uint32 *valp) { - int error; - error = (*valp & ~0xf) != 0; - return error; + return (*valp & ~0xf) != 0; } static int @@ -1859,9 +1853,7 @@ Operand_ar0_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_ar0_encode (uint32 *valp) { - int error; - error = (*valp & ~0x1f) != 0; - return error; + return (*valp & ~0x1f) != 0; } static int @@ -1873,9 +1865,7 @@ Operand_ar4_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_ar4_encode (uint32 *valp) { - int error; - error = (*valp & ~0x1f) != 0; - return error; + return (*valp & ~0x1f) != 0; } static int @@ -1887,9 +1877,7 @@ Operand_ar8_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_ar8_encode (uint32 *valp) { - int error; - error = (*valp & ~0x1f) != 0; - return error; + return (*valp & ~0x1f) != 0; } static int @@ -1901,9 +1889,7 @@ Operand_ar12_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_ar12_encode (uint32 *valp) { - int error; - error = (*valp & ~0x1f) != 0; - return error; + return (*valp & ~0x1f) != 0; } static int @@ -1915,9 +1901,7 @@ Operand_ars_entry_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_ars_entry_encode (uint32 *valp) { - int error; - error = (*valp & ~0x1f) != 0; - return error; + return (*valp & ~0x1f) != 0; } static int @@ -2487,9 +2471,7 @@ Operand_mx_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_mx_encode (uint32 *valp) { - int error; - error = (*valp & ~0x3) != 0; - return error; + return (*valp & ~0x3) != 0; } static int @@ -2517,9 +2499,7 @@ Operand_mw_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_mw_encode (uint32 *valp) { - int error; - error = (*valp & ~0x3) != 0; - return error; + return (*valp & ~0x3) != 0; } static int @@ -2531,9 +2511,7 @@ Operand_mr0_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_mr0_encode (uint32 *valp) { - int error; - error = (*valp & ~0x3) != 0; - return error; + return (*valp & ~0x3) != 0; } static int @@ -2545,9 +2523,7 @@ Operand_mr1_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_mr1_encode (uint32 *valp) { - int error; - error = (*valp & ~0x3) != 0; - return error; + return (*valp & ~0x3) != 0; } static int @@ -2559,9 +2535,7 @@ Operand_mr2_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_mr2_encode (uint32 *valp) { - int error; - error = (*valp & ~0x3) != 0; - return error; + return (*valp & ~0x3) != 0; } static int @@ -2573,9 +2547,7 @@ Operand_mr3_decode (uint32 *valp ATTRIBUTE_UNUSED) static int Operand_mr3_encode (uint32 *valp) { - int error; - error = (*valp & ~0x3) != 0; - return error; + return (*valp & ~0x3) != 0; } static int -- cgit v1.2.3-55-g7522