Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp575379lqd; Wed, 24 Apr 2024 10:25:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUWVK/6/Pg9KYypsIEP5Tk9C1+TdbEYls+k9xXFuYNbEi753kc2oqlqiIRTHTuMn83N5PrGznZEKh9jyYnhUDLWlhPLTFeh93tAREkAQ== X-Google-Smtp-Source: AGHT+IFhU6Y8M1+gXJ2Jcy2O8LxrPWUMjLCu9/nJ9nZGBCFp8YsfYZXyvA1S+LAw9RMkhcNL5DFU X-Received: by 2002:a17:906:3181:b0:a52:671a:aaf2 with SMTP id 1-20020a170906318100b00a52671aaaf2mr2110725ejy.72.1713979519731; Wed, 24 Apr 2024 10:25:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713979519; cv=pass; d=google.com; s=arc-20160816; b=AT6R7o9v7pL+9uD7vNFYl1KC70/Lv9lFV19ViinR+DW2chH39fTYJ6Eczf+zp7zjPz Z/df+RUFh0WC2c4jfPuRLkEp5gsPKqXNZEk4skboLCMf90MLnpfXbkvxXLnBG0GZSME6 2bhfiGaVIbS/WT7WqJ4i884TE09Q83J1n7dWMbQmu5VQV09fIFvZg3xGaCtTqKXC5QBS e6l2cXXQKWnsxgQuWKJQ8h3WsOX+1doiC1emnSLEvoM7fqO+XWGBc8YH/CQQWI68u91w ZoWPdaRXWh7av1dN0lcuwIJa38yQa0VrjYgYs1GhwTw3laeI+xj6DmC6tMlVAPyLOK5b 52qA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=SThXxrrFWfr4XpaycTj2jUDHyCT2BG+4V7axBwpEecc=; fh=ONcWLRte6g1WmGCJl0cxuwrbqMc0ygXVa9Ipo83fDfs=; b=TekIhsvmhJlMwt1c37aRFBIKLNiYpC8qtZ74JD//QFdLRN11Xcs7vMwiyqC+SBtdKj bGGYcT+CdZsnPkr+Jf7iDt0E3IHN6ITOrYilX7w33HsOQr1e0vCiLreh/FN2NSFFx42o JZlVY7SzuK0YXrs2jqAF+o2kcZ2Sv+V18aPSJDYy9lDxk9najhE+vldr6Ydr4apzwyBe QnLGnEaz8AZid2mjeH/CHGsaUN846nYw2JKAqEbJca9X6hNC39I4q2sDOLPN6aO0/ylZ zCVh++6ukUFm8MO392Yk4JFChUzdJhRSsG1TITt6AthJdRNq/NtjcYr80BHbj6SN3dtK 5J9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RQri94Qa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157388-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lj9-20020a170906f9c900b00a589096d77asi1147533ejb.138.2024.04.24.10.25.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:25:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157388-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RQri94Qa; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157388-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157388-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6F1481F2754A for ; Wed, 24 Apr 2024 17:25:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BBAB16D9BA; Wed, 24 Apr 2024 17:24:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RQri94Qa" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88D2216D4F1; Wed, 24 Apr 2024 17:24:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713979489; cv=none; b=fhmMKxtNDvR/KUGi/mCSHvfyPZyeZDBcTxm5e/dD63KwOhO0Ed3i+L28h92vae8L/gH/jYoYxeyUMaF141ESfSby5BtDkzwYfcrX+GBF2pB215CKkoWvCjxRGxafUF/2H5PdGENHpQrmW7SlJZNf2Z+Pd71Flj522EnEcdWYCDs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713979489; c=relaxed/simple; bh=mqainrt4XKLYv8z9kzm8G5QEs7BPDOFUczSJPMpBbf4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t9NWYmjZVC2QyOtpu0nN4AZf1tDXhp8FbXcaxEy09dO7lk0+9pUTf2H+JJLWNREHj2kh86eXMM2sWZ1K77zQJQIvRNT8jBsCj8xdCHTxRdldSgu7Ll+q0APIV9Au4/Flw2+dqO78IPz9DwY8xkpxsEDMypSBGRWcHjVYIsnQhuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RQri94Qa; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF86AC2BD11; Wed, 24 Apr 2024 17:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713979489; bh=mqainrt4XKLYv8z9kzm8G5QEs7BPDOFUczSJPMpBbf4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RQri94QaNujD4nSl1pa6U3zylHpkeH3t7VIkaeTH7mS3kPyCwRx9Dk28CC+Auv1uf M5ePDrT3qVx+DR2IADn+PSp0xW+xlI51kbvPoq25QJpBwFBc3HY9soiUWfFtVCbQ2P MKg6Ac0a0Hg3ulRbkOOJbmYgfbL5hSW1KOBZGt27ztldIa4nZT/sCmFD6W+dNkU4Cw vXkYbyPSUidn6Ew6t+NLpYPgKaIORO+/1vgzKXBSoFiPsEl3/2JP3kSO1nPOgwWfJy 0WdR8X7LpptJvr1mTQP0BYErOAt7EQbcZsh4xTSfQiB48MbcXyevmRPCEjFexUMpTk g0LOz8CvV0sZg== From: Nathan Chancellor Date: Wed, 24 Apr 2024 10:24:06 -0700 Subject: [PATCH v2 03/10] selftests: membarrier: ksft_exit_pass() does not return Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240424-ksft-exit-int-to-void-v2-3-c35f3b8c9ca0@kernel.org> References: <20240424-ksft-exit-int-to-void-v2-0-c35f3b8c9ca0@kernel.org> In-Reply-To: <20240424-ksft-exit-int-to-void-v2-0-c35f3b8c9ca0@kernel.org> To: shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Muhammad Usama Anjum , Thomas Gleixner , Nathan Chancellor X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2001; i=nathan@kernel.org; h=from:subject:message-id; bh=mqainrt4XKLYv8z9kzm8G5QEs7BPDOFUczSJPMpBbf4=; b=owGbwMvMwCUmm602sfCA1DTG02pJDGmaDrGp+XcZWmt3m6y3XJs+teveNYcZk7+9dPiUGJt4y C2p+ezXjlIWBjEuBlkxRZbqx6rHDQ3nnGW8cWoSzBxWJpAhDFycAjCR978ZGab8djvy0ND+1ZP1 DpPdu1oeVmn8yzTdl29+yyLht2Wk8xaG/0712dyhNkflWA83Ky2JYCks0i0L+HfpVfeH3eLtGSf a+AE= X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 After commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn"), ksft_exit_...() functions are marked as __noreturn, which means the return type should not be 'int' but 'void' because they are not returning anything (and never were since exit() has always been called). To facilitate updating the return type of these functions, remove 'return' before the calls to ksft_exit_pass(), as __noreturn prevents the compiler from warning that a caller of ksft_exit_pass() does not return a value because the program will terminate upon calling these functions. Reviewed-by: Muhammad Usama Anjum Reviewed-by: Thomas Gleixner Signed-off-by: Nathan Chancellor --- tools/testing/selftests/membarrier/membarrier_test_multi_thread.c | 2 +- tools/testing/selftests/membarrier/membarrier_test_single_thread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c b/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c index a9cc17facfb3..4e14dba81234 100644 --- a/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c +++ b/tools/testing/selftests/membarrier/membarrier_test_multi_thread.c @@ -69,5 +69,5 @@ int main(int argc, char **argv) /* Multi-threaded */ test_mt_membarrier(); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/membarrier/membarrier_test_single_thread.c b/tools/testing/selftests/membarrier/membarrier_test_single_thread.c index 4cdc8b1d124c..fa3f1d6c37a0 100644 --- a/tools/testing/selftests/membarrier/membarrier_test_single_thread.c +++ b/tools/testing/selftests/membarrier/membarrier_test_single_thread.c @@ -24,5 +24,5 @@ int main(int argc, char **argv) test_membarrier_get_registrations(/*cmd=*/0); - return ksft_exit_pass(); + ksft_exit_pass(); } -- 2.44.0