From patchwork Fri Dec 10 17:33:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 12670455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A064C433EF for ; Fri, 10 Dec 2021 17:35:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 688AA6B0078; Fri, 10 Dec 2021 12:33:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 546E86B007B; Fri, 10 Dec 2021 12:33:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3BB176B007E; Fri, 10 Dec 2021 12:33:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0233.hostedemail.com [216.40.44.233]) by kanga.kvack.org (Postfix) with ESMTP id 220756B007B for ; Fri, 10 Dec 2021 12:33:42 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D5F438248D52 for ; Fri, 10 Dec 2021 17:33:31 +0000 (UTC) X-FDA: 78902581422.31.4B47A2E Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by imf05.hostedemail.com (Postfix) with ESMTP id 43855100009 for ; Fri, 10 Dec 2021 17:33:30 +0000 (UTC) Received: by mail-ot1-f45.google.com with SMTP id h19-20020a9d3e53000000b0056547b797b2so10308211otg.4 for ; Fri, 10 Dec 2021 09:33:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NDgcHDpgiGWK9Ew3NHUhEO9yqNh1ILLLayqUXO2p75w=; b=RBvRuhdbY7g+jhhycOa6s6AnQRPB9u+jMTQAdWAGcbZry4Gs71DzkZXrtyFNlzrjYb t6cYRkjUJNJA0VqVa9VD5NUujJb9jkn5OXNmdw0ZBi1zYANnBFWUCoJvVfZtk5h4sJn1 eqbzyIxoNgJ2evkyeFqyx5i3WODR+TVyV1f2E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NDgcHDpgiGWK9Ew3NHUhEO9yqNh1ILLLayqUXO2p75w=; b=WAq5CFAGaX0Zn+0STpZMBwKkGXjlJd1eIg6CUjdfV0bE0X+yNgSNaJoFE0ccHyLPJv 0KbEjTOfydBC9i4mFjhIM5ty9ZGgbnDye3icQbdZWfTM73MtmTdCpmexuE0UlPSu9VAc XBQe2dU6kWvVkuIGlAmfzdUbrN23AOdcyM0MDrK+TUBJJjEZ66X++acUnu7j19VfyGuk OT74fvObzVT0RIERLcTf9YLSZFbaBGnpMJFFdku1cgp5KiMQ4/BZvIPVuwKG+DHhN8db ouqs//Gja7DWAyzuiH1W6Dj69i2I1wqJ2spaVhUnriA6F366nwp8Sfh6k8d5av3gPfB4 6WOQ== X-Gm-Message-State: AOAM531EeJFTJsNiPtLmwNHeYTpeG5PYPlSpLA+Lj3MYsmtwE0J9JUj4 sNyD8094/Cx6ZbcsniKhna59OQ== X-Google-Smtp-Source: ABdhPJyA4yaTBTIyZO1xnTM+/bAUFXSJizFV+09oAtmwLgPNp33uTLG6kCjRdELfrCYBpviWIZftqA== X-Received: by 2002:a05:6830:118a:: with SMTP id u10mr11939448otq.194.1639157609588; Fri, 10 Dec 2021 09:33:29 -0800 (PST) Received: from shuah-t480s.internal (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id x4sm892224oiv.35.2021.12.10.09.33.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:33:29 -0800 (PST) From: Shuah Khan To: catalin.marinas@arm.com, will@kernel.org, shuah@kernel.org, keescook@chromium.org, mic@digikod.net, davem@davemloft.net, kuba@kernel.org, peterz@infradead.org, paulmck@kernel.org, boqun.feng@gmail.com, akpm@linux-foundation.org Cc: Shuah Khan , linux-kselftest@vger.kernel.org, linux-security-module@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 04/12] selftests/core: remove ARRAY_SIZE define from close_range_test.c Date: Fri, 10 Dec 2021 10:33:14 -0700 Message-Id: <0b20692e28c83822bb6b56518791371120582d0e.1639156389.git.skhan@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 43855100009 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=google header.b=RBvRuhdb; spf=pass (imf05.hostedemail.com: domain of skhan@linuxfoundation.org designates 209.85.210.45 as permitted sender) smtp.mailfrom=skhan@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org X-Rspamd-Server: rspam04 X-Stat-Signature: 934hdo8em4mnqqfgs99yb7bztnrzt9cp X-HE-Tag: 1639157610-997823 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: ARRAY_SIZE is defined in several selftests. Remove definitions from individual test files and include header file for the define instead. ARRAY_SIZE define is added in a separate patch to prepare for this change. Remove ARRAY_SIZE from close_range_test.c and pickup the one defined in kselftest.h. Signed-off-by: Shuah Khan --- tools/testing/selftests/core/close_range_test.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/testing/selftests/core/close_range_test.c b/tools/testing/selftests/core/close_range_test.c index aa7d13d91963..749239930ca8 100644 --- a/tools/testing/selftests/core/close_range_test.c +++ b/tools/testing/selftests/core/close_range_test.c @@ -50,10 +50,6 @@ static inline int sys_close_range(unsigned int fd, unsigned int max_fd, return syscall(__NR_close_range, fd, max_fd, flags); } -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - TEST(core_close_range) { int i, ret;