Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp576085lqd; Wed, 24 Apr 2024 10:26:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYKA982HLYZSznxQnUdOQzJ1kvGGLrcB0/06ulR81rpH8XH3lFBl4ebIFAjz/vUa39xn1I96YafkiUqp/A4jSmwNKeBaxTVojXf/taBA== X-Google-Smtp-Source: AGHT+IHwD6MgeAMNoHDGa6e9IZlRhn5p22QZeAp9tvTK3M0laTeYAk+wonqTzZxK1oHSKDqvFNCd X-Received: by 2002:a05:6a20:9193:b0:1a7:7cae:24dc with SMTP id v19-20020a056a20919300b001a77cae24dcmr3751157pzd.5.1713979589599; Wed, 24 Apr 2024 10:26:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713979589; cv=pass; d=google.com; s=arc-20160816; b=zDXaZsdO4NJZThjdDCgfyaoPnYwHhXCuKXCshiRWcFZJ/lKAACZjVZ8iiT/6JF2sEm IMCAl7l+faMv8dSAE9LvyJTYyCDCJxEUQ4ynnGZDQbLcZJScQacDtQJj+JZKYfoNqgaF 90Di2qsisWeZ3OEM2UAmdx7p+UrHPdUtRhYzpu7NXWhYSHnvbjOL8dy2hj7zrGZjD+cF cxQms1QDqQ+31E8TYJu8vRWc4nCHc5XFQo3z6EMJ2zqlLgeH6dKRPr44XfBZ7ijgINyi 7n+5Uw9ayUUWV6NekKjqDpWeqK6TuW5ZFTEXrypRNuqGy8jVPeHTk7AfEpT3YCinkpy4 slrg== 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=UjqRMqoDD6a9yJ0/cEBiqPKlU7zwkGkh6hlZYq1iql0=; fh=VNwrPadDYeSPb1MCOToJaaHNOSI6nakNFHKosTxi3Zo=; b=EsSBTz6QWV6XZSwvHyn30YQfm0MLkpL0t4vWUU5qlTo5TudjZhs22MbXUleINa+u6P DpM93LoALkblz9ySJYVV2L4Rp6OGQOvcvFF6zGFJ1u9R31T18vES6vPUjpqwlX6xsm9a bYf/uhOZlKZqehtl+6EpJXlZLxE5guZFwADQRktdcV9k4RsP1leTuekR4cG05ISYrkrn d3XWG5nIacpyZLSMJheYo9N5v37bG5HNuQEVjmK/9Nwvd7ipotEd46vtJzU0qJMZCuZ9 7YwFZfiaJQjvLFEQHzXyZPZ2FLEbkU7NgpBvRa6y8TW3XLFSQUXGJ3f1lLaihM53DeLF 93tQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tjD7nKIH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157389-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157389-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. [139.178.88.99]) by mx.google.com with ESMTPS id i5-20020a654845000000b005e2b1c99876si12193626pgs.336.2024.04.24.10.26.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 10:26:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157389-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tjD7nKIH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157389-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157389-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 7291C2897CF for ; Wed, 24 Apr 2024 17:25:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33C3816DEA7; Wed, 24 Apr 2024 17:24:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tjD7nKIH" 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 1D90716D9A9; 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=1713979490; cv=none; b=bSyHwtzYXs2LcVeRBbmiTzKSwIOG4Q2vQatlQSeAYYBTwjvsZ+sqY5tUbC5QE43rVcXOx+P08ecnctbu2epHvRtOCZmKmIFBZrlNWjs9N17xDZ0jPLxYm89fdBPlRBLxc2299hDwanWQgHj6VeXHhDx8DIxfWcIozpKdFZNdBH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713979490; c=relaxed/simple; bh=GWpSfOZS2K51RIY5HOOiuGLu67UwmCDp9SYGDLDiQp4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jOsiE33xTIQ2eoPlTZekGHuXWSFEB/6lQFKpklZG/QfrBolNG5lODea2+LNhsU8kap7qnwB4ne0bafRQB3gewKSBK8LU1bRaAWaPLPngPGiKAONpSKonXLa5HoHpXL2M3LWCIczDzxe26D3qwi3naHax2xnBPgeR/4H1CBChzt0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tjD7nKIH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4576BC4AF0F; Wed, 24 Apr 2024 17:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713979489; bh=GWpSfOZS2K51RIY5HOOiuGLu67UwmCDp9SYGDLDiQp4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=tjD7nKIHVmBOV3N5MSCSCjPY+RbJgOA7wKENGoAnKqQ4P415hy1U2lj6EjGgRf9wa KBufw4uZKfrb7T2BZ7v6RUq92GchH3l6yCVNdghNtPvBCi6WqwCbH8kkGU1MDzx1Sp Pe1ZZJNxPOG262JqBhdUlh2dFwZBz20MeAVXZINXrjKH6d10/VZ0b+vcKH2pTKBvgM JN/OymHrQYtqfLy/4SnFDi3f5oMQCFq91E0D13512HcAaHGHD+2nicb3KENxb4IJGL IJ48HdL2rU4VFsuPJTUUIlTN5ZqP3XkZIOrwmEFM7RxY6zboVQE1mSxMYILvXmFJch z+gLzmF8KfNtg== From: Nathan Chancellor Date: Wed, 24 Apr 2024 10:24:07 -0700 Subject: [PATCH v2 04/10] selftests/mm: ksft_exit functions do 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-4-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 , akpm@linux-foundation.org, linux-mm@kvack.org X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=5922; i=nathan@kernel.org; h=from:subject:message-id; bh=GWpSfOZS2K51RIY5HOOiuGLu67UwmCDp9SYGDLDiQp4=; b=owGbwMvMwCUmm602sfCA1DTG02pJDGmaDrHdSRfSpIslJsW+bnT3PP9x327Gw8XK0gmTll1ad 1dt4YmyjlIWBjEuBlkxRZbqx6rHDQ3nnGW8cWoSzBxWJpAhDFycAjCR9d8YGTZKXH7y9Drf2408 D8z3mNifCD2+pf6gbHjPdM4CC6F+Vn5Ghgd3esNbxVZ2aJ7beGLJ4Z0PQ7lWPXs7h03sb1369ea J3owA 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_...(), as __noreturn prevents the compiler from warning that a caller of the ksft_exit functions 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 --- Cc: akpm@linux-foundation.org Cc: linux-mm@kvack.org --- tools/testing/selftests/mm/compaction_test.c | 6 +++--- tools/testing/selftests/mm/cow.c | 2 +- tools/testing/selftests/mm/gup_longterm.c | 2 +- tools/testing/selftests/mm/gup_test.c | 4 ++-- tools/testing/selftests/mm/ksm_functional_tests.c | 2 +- tools/testing/selftests/mm/madv_populate.c | 2 +- tools/testing/selftests/mm/mkdirty.c | 2 +- tools/testing/selftests/mm/pagemap_ioctl.c | 4 ++-- tools/testing/selftests/mm/soft-dirty.c | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c index 533999b6c284..4f42eb7d7636 100644 --- a/tools/testing/selftests/mm/compaction_test.c +++ b/tools/testing/selftests/mm/compaction_test.c @@ -177,7 +177,7 @@ int main(int argc, char **argv) ksft_print_header(); if (prereq() || geteuid()) - return ksft_exit_skip("Prerequisites unsatisfied\n"); + ksft_exit_skip("Prerequisites unsatisfied\n"); ksft_set_plan(1); @@ -225,7 +225,7 @@ int main(int argc, char **argv) } if (check_compaction(mem_free, hugepage_size) == 0) - return ksft_exit_pass(); + ksft_exit_pass(); - return ksft_exit_fail(); + ksft_exit_fail(); } diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c index 363bf5f801be..fe078d6e1806 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -1779,5 +1779,5 @@ int main(int argc, char **argv) if (err) ksft_exit_fail_msg("%d out of %d tests failed\n", err, ksft_test_num()); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/mm/gup_longterm.c b/tools/testing/selftests/mm/gup_longterm.c index ad168d35b23b..d7eaca5bbe9b 100644 --- a/tools/testing/selftests/mm/gup_longterm.c +++ b/tools/testing/selftests/mm/gup_longterm.c @@ -456,5 +456,5 @@ int main(int argc, char **argv) if (err) ksft_exit_fail_msg("%d out of %d tests failed\n", err, ksft_test_num()); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/mm/gup_test.c b/tools/testing/selftests/mm/gup_test.c index 18a49c70d4c6..bd335cf9bc0e 100644 --- a/tools/testing/selftests/mm/gup_test.c +++ b/tools/testing/selftests/mm/gup_test.c @@ -228,7 +228,7 @@ int main(int argc, char **argv) break; } ksft_test_result_skip("Please run this test as root\n"); - return ksft_exit_pass(); + ksft_exit_pass(); } p = mmap(NULL, size, PROT_READ | PROT_WRITE, flags, filed, 0); @@ -267,5 +267,5 @@ int main(int argc, char **argv) free(tid); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/mm/ksm_functional_tests.c b/tools/testing/selftests/mm/ksm_functional_tests.c index d615767e396b..508287560c45 100644 --- a/tools/testing/selftests/mm/ksm_functional_tests.c +++ b/tools/testing/selftests/mm/ksm_functional_tests.c @@ -646,5 +646,5 @@ int main(int argc, char **argv) if (err) ksft_exit_fail_msg("%d out of %d tests failed\n", err, ksft_test_num()); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/mm/madv_populate.c b/tools/testing/selftests/mm/madv_populate.c index 17bcb07f19f3..ef7d911da13e 100644 --- a/tools/testing/selftests/mm/madv_populate.c +++ b/tools/testing/selftests/mm/madv_populate.c @@ -307,5 +307,5 @@ int main(int argc, char **argv) if (err) ksft_exit_fail_msg("%d out of %d tests failed\n", err, ksft_test_num()); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/mm/mkdirty.c b/tools/testing/selftests/mm/mkdirty.c index 301abb99e027..b8a7efe9204e 100644 --- a/tools/testing/selftests/mm/mkdirty.c +++ b/tools/testing/selftests/mm/mkdirty.c @@ -375,5 +375,5 @@ int main(void) if (err) ksft_exit_fail_msg("%d out of %d tests failed\n", err, ksft_test_num()); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/mm/pagemap_ioctl.c b/tools/testing/selftests/mm/pagemap_ioctl.c index d59517ed3d48..2d785aca72a5 100644 --- a/tools/testing/selftests/mm/pagemap_ioctl.c +++ b/tools/testing/selftests/mm/pagemap_ioctl.c @@ -1484,7 +1484,7 @@ int main(int argc, char *argv[]) ksft_print_header(); if (init_uffd()) - return ksft_exit_pass(); + ksft_exit_pass(); ksft_set_plan(115); @@ -1660,5 +1660,5 @@ int main(int argc, char *argv[]) userfaultfd_tests(); close(pagemap_fd); - return ksft_exit_pass(); + ksft_exit_pass(); } diff --git a/tools/testing/selftests/mm/soft-dirty.c b/tools/testing/selftests/mm/soft-dirty.c index 7dbfa53d93a0..d9dbf879748b 100644 --- a/tools/testing/selftests/mm/soft-dirty.c +++ b/tools/testing/selftests/mm/soft-dirty.c @@ -209,5 +209,5 @@ int main(int argc, char **argv) close(pagemap_fd); - return ksft_exit_pass(); + ksft_exit_pass(); } -- 2.44.0