From patchwork Fri Dec 10 17:33:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 12670447 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 E60FAC433EF for ; Fri, 10 Dec 2021 17:33:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5DF916B0072; Fri, 10 Dec 2021 12:33:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 58F146B0073; Fri, 10 Dec 2021 12:33:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 456886B0074; Fri, 10 Dec 2021 12:33:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id 37A4C6B0072 for ; Fri, 10 Dec 2021 12:33:37 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DBAA9180E4EFD for ; Fri, 10 Dec 2021 17:33:26 +0000 (UTC) X-FDA: 78902581212.12.31AAFEC Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by imf23.hostedemail.com (Postfix) with ESMTP id E9117140008 for ; Fri, 10 Dec 2021 17:33:24 +0000 (UTC) Received: by mail-oi1-f169.google.com with SMTP id be32so14113256oib.11 for ; Fri, 10 Dec 2021 09:33:26 -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:mime-version :content-transfer-encoding; bh=N5piJeGroEj5EK/nl0Pv9Gmn3OrmZFhy1pHRTuf94YA=; b=g9+QdAKDtcUtq15KKC71Ntw+2MfOqG+XUAQDqkyK7Jg0EbL9dU9e9fXhNMoyUMDS5G SnEWEn5JGFiH1/nSNkFCTpxAiKtRKqutdPjBo0jWoagYZ398eZrrSfq7jzPEDfvmoJ99 VuMh+A1ngJiI8532kLDIzoUxuLCkV+f6nJptA= 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:mime-version :content-transfer-encoding; bh=N5piJeGroEj5EK/nl0Pv9Gmn3OrmZFhy1pHRTuf94YA=; b=V3J3fxon8A6MI6BTBEbT8SXkRuRmHt1l+QvdccF4EZtaJt9oM4NTyCUX36ud5YrH9V QEVPaubG8x1UACyZKRobIJUTGq4/JgutvWcNjBDukbwYvC2Y4eM9H9CxVxfGLsuNnQ8E /tAkIhirNdEJzd+cVvdBc2iVXx2DhsBklC98QPij0MjfvZ0ICwQry+8CxSeNSycNUSLX v7q34M7151Z7h0HreBgu5nXF/yZoR100hKYHKiuMQphm5lc4p5/hqMzTcQotw0eiZNF6 jZk41BObA5/+124GjxY/lMhYAc7/Iysc9VuK9mP/FM+HTBRGzHJThP51XmS1CZpqjibY 4XBQ== X-Gm-Message-State: AOAM531wOc0D6v7ymbaGFxf/mCt5G1qAm5y4iGWL/kBZvPgstOLnLDWA r1lmvwfUmSc7fdAFwvF79VPMjA== X-Google-Smtp-Source: ABdhPJwpegtHSTsU291UpONzkrU9vfCDqPTNb+9w5/E07tR0hubuohplY3DJy4sIWD9rkj30iZEy5g== X-Received: by 2002:a05:6808:485:: with SMTP id z5mr13675532oid.96.1639157605614; Fri, 10 Dec 2021 09:33:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:33:25 -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 00/12] selftests: Remove ARRAY_SIZE duplicate defines Date: Fri, 10 Dec 2021 10:33:10 -0700 Message-Id: X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Stat-Signature: fg7xgsfnfqc8zjr9iqyiexb7qath3rdr Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=google header.b=g9+QdAKD; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf23.hostedemail.com: domain of skhan@linuxfoundation.org designates 209.85.167.169 as permitted sender) smtp.mailfrom=skhan@linuxfoundation.org X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: E9117140008 X-HE-Tag: 1639157604-319971 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. There are about 25+ duplicate defines in various selftests source and header files. This patch series removes the duplicated defines. Several tests that define ARRAY_SIZE also include kselftest.h or kselftest_harness.h. Remove ARRAY_SIZE defines from them. Some tests that define ARRAY_SIZE don't include headers that define it. Remove ARRAY_SIZE define and include kselftest.h The first patch in this series: - Adds ARRAY_SIZE define to kselftest.h - Adds ifndef guard around ARRAY_SIZE define in tools/include/linux/kernel.h and kselftest_harness.h - Patches 2-12 do the cleanup and depend on patch 1, hence will have to go through kselftest tree. Shuah Khan (12): tools: fix ARRAY_SIZE defines in tools and selftests hdrs selftests/arm64: remove ARRAY_SIZE define from vec-syscfg.c selftests/cgroup: remove ARRAY_SIZE define from cgroup_util.h selftests/core: remove ARRAY_SIZE define from close_range_test.c selftests/ir: remove ARRAY_SIZE define from ir_loopback.c selftests/landlock: remove ARRAY_SIZE define from common.h selftests/net: remove ARRAY_SIZE define from individual tests selftests/rseq: remove ARRAY_SIZE define from individual tests selftests/seccomp: remove ARRAY_SIZE define from seccomp_benchmark selftests/sparc64: remove ARRAY_SIZE define from adi-test selftests/timens: remove ARRAY_SIZE define from individual tests selftests/vm: remove ARRAY_SIZE define from individual tests tools/include/linux/kernel.h | 2 ++ tools/testing/selftests/arm64/fp/vec-syscfg.c | 2 -- tools/testing/selftests/cgroup/cgroup_util.h | 4 ++-- tools/testing/selftests/core/close_range_test.c | 4 ---- tools/testing/selftests/ir/ir_loopback.c | 1 - tools/testing/selftests/kselftest.h | 4 ++++ tools/testing/selftests/kselftest_harness.h | 2 ++ tools/testing/selftests/landlock/common.h | 4 ---- tools/testing/selftests/net/gro.c | 3 ++- tools/testing/selftests/net/ipsec.c | 1 - tools/testing/selftests/net/reuseport_bpf.c | 4 +--- tools/testing/selftests/net/rxtimestamp.c | 2 +- tools/testing/selftests/net/socket.c | 3 ++- tools/testing/selftests/net/tcp_fastopen_backup_key.c | 6 ++---- tools/testing/selftests/rseq/basic_percpu_ops_test.c | 3 +-- tools/testing/selftests/rseq/rseq.c | 3 +-- tools/testing/selftests/seccomp/seccomp_benchmark.c | 2 +- tools/testing/selftests/sparc64/drivers/adi-test.c | 4 ---- tools/testing/selftests/timens/procfs.c | 2 -- tools/testing/selftests/timens/timens.c | 2 -- tools/testing/selftests/vm/mremap_test.c | 1 - tools/testing/selftests/vm/pkey-helpers.h | 3 ++- tools/testing/selftests/vm/va_128TBswitch.c | 2 +- 23 files changed, 24 insertions(+), 40 deletions(-)