Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp576309lqd; Wed, 24 Apr 2024 10:26:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxHngrMJgnhn6M/msXG/mnFr4QfvdH113eg7JrXfvgI03P16WZOFJtAR2DEXuBEf2UXeThI0dkThx1q+JrY2OtaMge7nn+STkWQmtxdQ== X-Google-Smtp-Source: AGHT+IGqXywfq45vDHtGbEi54DFKPBtxQL9sFqvwa5wrCwsqFoK94b1R0XBJGWu1Hf3RycNx3Ii+ X-Received: by 2002:a17:90a:fb8b:b0:2af:8fb6:34da with SMTP id cp11-20020a17090afb8b00b002af8fb634damr969041pjb.49.1713979614833; Wed, 24 Apr 2024 10:26:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713979614; cv=pass; d=google.com; s=arc-20160816; b=XtTXvAuxko4lavPNviVRiommrTXzytHsrHqwsT1f9HKbBxudSOmdupDdXru0G3an8U U7iGKvyd6YxdsudXTWgtp8SMybev2ostU7cZ08ay/o+RrRtkNNl0YRENesrdU4mWsYZ+ YBw9bwabFoY6qO/Hafhh6K+zZkBPxrIqJ8bVby95RAs/ImxpAS0mlCshEvO19FjAl4Or eWoseKMaobTH3+tn5Tz2/0cYX0DU9V2p/QlKIrv9oFLpZEAMKgvhStaG0qWxyIhecmx6 um6oVn8FM8sQzjvMZVAWub4wZjvMhpt9iEYw6rSz12VOk8qwMsOuUMh3anojX1AXxWFm RcHg== 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=YBHN0he9hddo0PP74XraCOLUAAwRJ0Gw1v8Mcq6CHl4=; fh=ONcWLRte6g1WmGCJl0cxuwrbqMc0ygXVa9Ipo83fDfs=; b=ApMnnLx4uKWsc0QX/FnA1iUTICO7XS6gzaeK41FVF1gOglLszkzO3VJIX0r4bUdNmq JmzFUUUiXW1CZKUDePyJQf46L1PgIJp6Jhnl/5tqHj8vnFKjw0pD7nhFx6Nc4wurKJX3 nWO8+lH2lQ7rZMsT27M3qgQRpOK1jrzRvCy30mLXNg43xdROzm9sKWF2uAXD986rvqg+ L87ni+2En2DXZ9NFcH72H7sUA5vya+W+hrqYQpWSMVQhVjfp0Gd3bLQ458iMtPpJZF7r vPsqwjwuEGqVaBNXNQ0BkBbnEYB4tdNGM0X5ch8UdBgjERNiYtfQaJvhla9hZ2Wpxunr makQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KEtFpn6D; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157392-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157392-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o14-20020a17090ab88e00b002a4ed388b28si11768824pjr.82.2024.04.24.10.26.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:26:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157392-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KEtFpn6D; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157392-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157392-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E98C228B0B8 for ; Wed, 24 Apr 2024 17:26:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B438916E875; Wed, 24 Apr 2024 17:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KEtFpn6D" 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 899D216DEC0; Wed, 24 Apr 2024 17:24:51 +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=1713979491; cv=none; b=H4suWT27rq0SwhmXA51PSal1G287/Bm21u0dBxMKwyQh54VHjb8GDMyGTphIJgqYl/a8SBwhRYLW3XwM3YnP1mwOLdtcPATCvdUasJYmzaDPaN/BRp6DGObyDaxVSYhGe+HCihSAnRWV7EfiagQHs2mDiEpBwhbrYJJ5mXyOXow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713979491; c=relaxed/simple; bh=5bcOCoiv7z9bfpXac60/pYpWDL3JKCADJVEOACSTLEc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VdAdGxO4aILsrX107PNV2Jmb+UpMmbKLYo1xxF2VGD3UGGdSEbS0V1Pdxz2cvkOzxM1OeoEhb2oim0/4t5KsqhwbIha8YScnRvFOFlNk69WaY0RZVSBI1adfT6nBRIfGSgUTIg4a/FCTnLCdfwyNnILwMBVYfX+Wi1CCUC4XSxE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KEtFpn6D; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E8BFC32783; Wed, 24 Apr 2024 17:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713979491; bh=5bcOCoiv7z9bfpXac60/pYpWDL3JKCADJVEOACSTLEc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KEtFpn6Djbjd3G8efcGjKrZ+LHJkH1roOgg0pvoRMuf6FhZhZ28z71t/YXJNIqcij sabee9Gkh/XXWXgokwh/Y/iARR5EgmP52up2YrmrtrXbjO6DNv1vKTy0zpMzp/UXBH fMxx5/NA4P7Ud3ObdZsLVnU79HAPFNMxBRsyUXuRbYTbOhsW+JnCh9fGoHIYu5IdYR Mm1z2hzLFeVF73pLL6PA7q9CYoEqsfsuQjDt4HdzNo6sGbhWSYknaPgbr81UhqG/8z LeVhcyZWW+39UmH2Bm29fvMuaUBOns5O+QfTeuPUa0ulBYX8CyEfFfPssXYgWI5lt/ mnDlw+rUha5XA== From: Nathan Chancellor Date: Wed, 24 Apr 2024 10:24:10 -0700 Subject: [PATCH v2 07/10] selftests: sync: 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-7-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=1415; i=nathan@kernel.org; h=from:subject:message-id; bh=5bcOCoiv7z9bfpXac60/pYpWDL3JKCADJVEOACSTLEc=; b=owGbwMvMwCUmm602sfCA1DTG02pJDGmaDnEN/026bMynTmIPjTmzklVk3zyzyo0hh1Vv2iq8V gjp5wvoKGVhEONikBVTZKl+rHrc0HDOWcYbpybBzGFlAhnCwMUpABOxlmf478F3/8oL2+Dc+ULd XYKiHKU3ThRfXWM1X9FtkVb24fOdLAz/FJfv+C2/0GbChnc/5J2+XuIu0vzOk1T07ki/+Z2Ldsu n8wEA 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 call 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 (which is what the comment alluded to as well). Reviewed-by: Muhammad Usama Anjum Reviewed-by: Thomas Gleixner Signed-off-by: Nathan Chancellor --- tools/testing/selftests/sync/sync_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/sync/sync_test.c b/tools/testing/selftests/sync/sync_test.c index 414a617db993..93db5aa246a3 100644 --- a/tools/testing/selftests/sync/sync_test.c +++ b/tools/testing/selftests/sync/sync_test.c @@ -109,6 +109,5 @@ int main(void) ksft_exit_fail_msg("%d out of %d sync tests failed\n", err, ksft_test_num()); - /* need this return to keep gcc happy */ - return ksft_exit_pass(); + ksft_exit_pass(); } -- 2.44.0