From patchwork Fri Dec 10 17:33:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 12670465 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 16C3BC433F5 for ; Fri, 10 Dec 2021 17:38:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40AEA6B0081; Fri, 10 Dec 2021 12:33:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3BB786B0082; Fri, 10 Dec 2021 12:33:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2A9136B0083; Fri, 10 Dec 2021 12:33:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id 1ADEC6B0081 for ; Fri, 10 Dec 2021 12:33:46 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D1D7E82FD7 for ; Fri, 10 Dec 2021 17:33:35 +0000 (UTC) X-FDA: 78902581590.15.8BDF0F6 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by imf06.hostedemail.com (Postfix) with ESMTP id 83DA4180012 for ; Fri, 10 Dec 2021 17:33:34 +0000 (UTC) Received: by mail-ot1-f46.google.com with SMTP id h19-20020a9d3e53000000b0056547b797b2so10308419otg.4 for ; Fri, 10 Dec 2021 09:33:34 -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=Ol2LYejDODLNDCE9czeVtY6ZXvOj8cq9Dfk6NPWHsZY=; b=HBUNCaPvhfUaNQMquE8OUfIRrgmyX82ibPWw02Ng8pu7UyIZi6ZN6ze3wHpalVRLq8 CruwY2I6pMfj2zKyYebS6zyfpAu0zAI0d0VcLZdnKAbaQdFIPrJT+/hLE+aMawAK6euu TsIJst1MmQSizYM3Y4pSmGaUHMkpUbyfEJ0k0= 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=Ol2LYejDODLNDCE9czeVtY6ZXvOj8cq9Dfk6NPWHsZY=; b=bxTxoRb8kXiwg6VFz+i7fWGuCg/5+WPN60yvaYLBSIJd9R7NTLZ53rRuQH4cXUn1Z+ NG3k8SKZakAhbLlv0LUKRRUlo0u95LKsBppyIABRvrQ2VVuJfc5YplcCi8wMBWEQUoVW lHJEMJ9JlIAW5p1z6W0/kMowYj7yHrKjeD8i0Q0/IpLu6tdMnLbUEFDS3BV9lKu0Nzq3 BSYvciavqc1t6DXrvTzsrYwxcEhPjdpGt5hRFO3jd6d+8dW+cEIfYW8TJ+45vJKRHAuY WeZtBDmQ4YVH9e+EO1FjJGybmXavbeT6Ns5jZuqJOZU/DHYG5E/ODcXUwjNJHcXRC9gh KRzA== X-Gm-Message-State: AOAM531BqlVrLpRl9Sv+kJjHI6pr1IaDH1zshnlt/i9GHJdQDp8exrgT 9W+l7P/sP+19+wzY/OrcAdOMWA== X-Google-Smtp-Source: ABdhPJwC08jHpPh4Q3noN8ttIxOYmu22m0CTuK9V/wHlRnKrp4RkdnmVkknN/jUdmXkq6G6Ycz5roA== X-Received: by 2002:a05:6830:3094:: with SMTP id f20mr12233166ots.201.1639157614456; Fri, 10 Dec 2021 09:33:34 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:33:34 -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 09/12] selftests/seccomp: remove ARRAY_SIZE define from seccomp_benchmark Date: Fri, 10 Dec 2021 10:33:19 -0700 Message-Id: <80fa7078e0645649b6e31be4844a3cffbe67a79b.1639156389.git.skhan@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=google header.b=HBUNCaPv; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf06.hostedemail.com: domain of skhan@linuxfoundation.org designates 209.85.210.46 as permitted sender) smtp.mailfrom=skhan@linuxfoundation.org X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 83DA4180012 X-Stat-Signature: 8m17ktywujrfh1zsezccc46d4xip67dd X-HE-Tag: 1639157614-917592 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 seccomp_benchmark and pickup the one defined in kselftest.h. Signed-off-by: Shuah Khan Reviewed-by: Kees Cook --- tools/testing/selftests/seccomp/seccomp_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/seccomp/seccomp_benchmark.c b/tools/testing/selftests/seccomp/seccomp_benchmark.c index 6e5102a7d7c9..5b5c9d558dee 100644 --- a/tools/testing/selftests/seccomp/seccomp_benchmark.c +++ b/tools/testing/selftests/seccomp/seccomp_benchmark.c @@ -18,7 +18,7 @@ #include #include -#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) +#include "../kselftest.h" unsigned long long timing(clockid_t clk_id, unsigned long long samples) {