Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1637586pxb; Mon, 12 Apr 2021 03:06:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT1BM3z/PoI5XnWZHMs5qI2YV9Vz9S1Z5y562wVgvK/aTxurVUYbkt48yCUAgAJNc423Zk X-Received: by 2002:a63:5c63:: with SMTP id n35mr7343865pgm.214.1618221974233; Mon, 12 Apr 2021 03:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618221974; cv=none; d=google.com; s=arc-20160816; b=ftGFPiDftBxcaMnNwlPkYKKPuD0IZUfXiWouz4dIASKsmm+QRM26SloIyklO27yNDd cSbhRgllOKor3/uqFkNOn0ThXLciujnpKmk6127/VsAwvCwdw8ttarEdgYMGCp7Bje3d 0pbl5x7xTRKAClNnckP6A4gapNVsJjT+BEE/KKrzMf+BxKkj9sEyDLVHYEfWvu5lUHKi AFvp+DxGeVqBjUn95JRY8yneOUiCGbRTjNLZlzWa6jjZzC1vsbkaOFn4V/0xuNQ7t/9h VSMszhhvzp3hqaYbUwZdmkmmkeFJ4XMkYt8ES5NaY5wWYNF5CpVzbT+GljMVZCNXjxIf 6hKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LzuLVxiNRkVeO1R7c1cHhC17eIOaD6Tihlw2BwIVDhA=; b=LefX6Zon6yTpxteI04sqeRJW1lWCtGsBNiRBELe+pKPNmMn1orOuOhfmTTLH9AkROl 0ABShQLeutaXraFUHVDC3zgES1n/vpcYCVjMhfTg7VNCyf9QjVEdw0AoiAzVDga/8mNk Q1ek1sYJmA2bLLk42VlHgyo9ltguMTBCK+jT18Joe4ZRI6KscaPUgFWK+Fi3lSnK/8hb 4cROW4K+PlpUnlpoLJSOK4ssiZzk09cJaTK/ApBgZFdCj5g6Iye0V8iqVGx54vL4U2ZY bl7XEed2TTMH9whl7IDoOT/bbndHER3Vo9GAUMSgzbSz/PZZhG5WqAuUlw3CKpHQcEji m/ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si14124954pgf.212.2021.04.12.03.06.02; Mon, 12 Apr 2021 03:06:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238132AbhDLKD1 (ORCPT + 99 others); Mon, 12 Apr 2021 06:03:27 -0400 Received: from mail-m17635.qiye.163.com ([59.111.176.35]:65342 "EHLO mail-m17635.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244424AbhDLKAa (ORCPT ); Mon, 12 Apr 2021 06:00:30 -0400 Received: from wanjb-KLV-WX9.. (unknown [123.131.141.119]) by mail-m17635.qiye.163.com (Hmail) with ESMTPA id 5C287400351; Mon, 12 Apr 2021 18:00:10 +0800 (CST) From: Wan Jiabing To: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Shuah Khan , Jordan Niethe , Michael Neuling , Wan Jiabing , linuxppc-dev@lists.ozlabs.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net Subject: [PATCH] powerpc: alignment: Remove unneeded variables Date: Mon, 12 Apr 2021 17:59:21 +0800 Message-Id: <20210412095923.3916-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZGUJDHlYaGB5NH0lKQ0hIT0lVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWUFZT0tIVUpKS0 hKTFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PRQ6Szo*DD8JSx88MAkpEgsc CDxPFDZVSlVKTUpDSUlKTUpKSU9LVTMWGhIXVQwaFRESGhkSFRw7DRINFFUYFBZFWVdZEgtZQVlK SUhVSkhKVUpPSlVKSkJZV1kIAVlBTElCQzcG X-HM-Tid: 0a78c58636eed991kuws5c287400351 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix coccicheck warning: ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:539:5-7: Unneeded variable: "rc". Return "0" on line 562 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:567:5-7: Unneeded variable: "rc". Return "0" on line 580 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:585:5-7: Unneeded variable: "rc". Return "0" on line 594 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:600:5-7: Unneeded variable: "rc". Return "0" on line 611 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:416:5-7: Unneeded variable: "rc". Return "0" on line 470 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:475:5-7: Unneeded variable: "rc". Return "0" on line 485 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:490:5-7: Unneeded variable: "rc". Return "0" on line 506 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:511:5-7: Unneeded variable: "rc". Return "0" on line 534 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:331:5-7: Unneeded variable: "rc". Return "0" on line 344 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:349:5-7: Unneeded variable: "rc". Return "0" on line 360 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:365:5-7: Unneeded variable: "rc". Return "0" on line 392 ./tools/testing/selftests/powerpc/alignment/alignment_handler.c:397:5-7: Unneeded variable: "rc". Return "0" on line 411 Signed-off-by: Wan Jiabing --- .../powerpc/alignment/alignment_handler.c | 48 +++++-------------- 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/tools/testing/selftests/powerpc/alignment/alignment_handler.c b/tools/testing/selftests/powerpc/alignment/alignment_handler.c index c25cf7cd45e9..48bfb7b36d84 100644 --- a/tools/testing/selftests/powerpc/alignment/alignment_handler.c +++ b/tools/testing/selftests/powerpc/alignment/alignment_handler.c @@ -328,8 +328,6 @@ static bool can_open_cifile(void) int test_alignment_handler_vsx_206(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06)); @@ -341,13 +339,11 @@ int test_alignment_handler_vsx_206(void) STORE_VSX_XFORM_TEST(stxvd2x); STORE_VSX_XFORM_TEST(stxvw4x); STORE_VSX_XFORM_TEST(stxsdx); - return rc; + return 0; } int test_alignment_handler_vsx_207(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_2_07)); @@ -357,13 +353,11 @@ int test_alignment_handler_vsx_207(void) LOAD_VSX_XFORM_TEST(lxsiwzx); STORE_VSX_XFORM_TEST(stxsspx); STORE_VSX_XFORM_TEST(stxsiwx); - return rc; + return 0; } int test_alignment_handler_vsx_300(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_00)); @@ -389,13 +383,11 @@ int test_alignment_handler_vsx_300(void) STORE_VSX_XFORM_TEST(stxvx); STORE_VSX_XFORM_TEST(stxvl); STORE_VSX_XFORM_TEST(stxvll); - return rc; + return 0; } int test_alignment_handler_vsx_prefix(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1)); @@ -408,13 +400,11 @@ int test_alignment_handler_vsx_prefix(void) STORE_VSX_8LS_PREFIX_TEST(PSTXSSP, 0); STORE_VSX_8LS_PREFIX_TEST(PSTXV0, 0); STORE_VSX_8LS_PREFIX_TEST(PSTXV1, 1); - return rc; + return 0; } int test_alignment_handler_integer(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); printf("Integer\n"); @@ -467,13 +457,11 @@ int test_alignment_handler_integer(void) STORE_DFORM_TEST(stmw); #endif - return rc; + return 0; } int test_alignment_handler_integer_206(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06)); @@ -482,13 +470,11 @@ int test_alignment_handler_integer_206(void) LOAD_XFORM_TEST(ldbrx); STORE_XFORM_TEST(stdbrx); - return rc; + return 0; } int test_alignment_handler_integer_prefix(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1)); @@ -503,13 +489,11 @@ int test_alignment_handler_integer_prefix(void) STORE_MLS_PREFIX_TEST(PSTH); STORE_MLS_PREFIX_TEST(PSTW); STORE_8LS_PREFIX_TEST(PSTD); - return rc; + return 0; } int test_alignment_handler_vmx(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap(PPC_FEATURE_HAS_ALTIVEC)); @@ -531,13 +515,11 @@ int test_alignment_handler_vmx(void) STORE_VMX_XFORM_TEST(stvehx); STORE_VMX_XFORM_TEST(stvewx); STORE_VMX_XFORM_TEST(stvxl); - return rc; + return 0; } int test_alignment_handler_fp(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); printf("Floating point\n"); @@ -559,13 +541,11 @@ int test_alignment_handler_fp(void) STORE_FLOAT_XFORM_TEST(stfsux); STORE_FLOAT_XFORM_TEST(stfiwx); - return rc; + return 0; } int test_alignment_handler_fp_205(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_05)); @@ -577,13 +557,11 @@ int test_alignment_handler_fp_205(void) STORE_FLOAT_DFORM_TEST(stfdp); STORE_FLOAT_XFORM_TEST(stfdpx); - return rc; + return 0; } int test_alignment_handler_fp_206(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap(PPC_FEATURE_ARCH_2_06)); @@ -591,14 +569,12 @@ int test_alignment_handler_fp_206(void) LOAD_FLOAT_XFORM_TEST(lfiwzx); - return rc; + return 0; } int test_alignment_handler_fp_prefix(void) { - int rc = 0; - SKIP_IF(!can_open_cifile()); SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1)); @@ -608,7 +584,7 @@ int test_alignment_handler_fp_prefix(void) LOAD_FLOAT_MLS_PREFIX_TEST(PLFD); STORE_FLOAT_MLS_PREFIX_TEST(PSTFS); STORE_FLOAT_MLS_PREFIX_TEST(PSTFD); - return rc; + return 0; } void usage(char *prog) -- 2.30.2