From patchwork Fri Dec 10 17:33:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 12670467 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 609C2C433F5 for ; Fri, 10 Dec 2021 17:39:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D80D36B0082; Fri, 10 Dec 2021 12:33:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D30AF6B0083; Fri, 10 Dec 2021 12:33:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD19E6B0085; Fri, 10 Dec 2021 12:33:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id AF4E96B0082 for ; Fri, 10 Dec 2021 12:33:48 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 76C38181AF5EA for ; Fri, 10 Dec 2021 17:33:38 +0000 (UTC) X-FDA: 78902581716.31.DF6583B Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by imf05.hostedemail.com (Postfix) with ESMTP id D34AB100005 for ; Fri, 10 Dec 2021 17:33:37 +0000 (UTC) Received: by mail-ot1-f50.google.com with SMTP id x3-20020a05683000c300b0057a5318c517so10257675oto.13 for ; Fri, 10 Dec 2021 09:33:37 -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=DiZeUVUX8yxJeM10Cpt7v1VvqmpI5eFmoRBxYdddIiM=; b=K0OpNOeDoVajb3W4xt0KX7FV9FbcaAXSxNvrA6087bIQw7tap5Xv3ErI4wfxiVZEYz M6AfFqilfX8ijAknnwuE2KW46iOXBC7rxJrpuL1JwcedYnpdXUvl2dp2O008xrVpHkp/ 0+YC6YtffxgVuZdSYs9NfFLK09hxHT0eSo2gM= 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=DiZeUVUX8yxJeM10Cpt7v1VvqmpI5eFmoRBxYdddIiM=; b=KInuZDa00emigmPlxcDgAO9t6ad+5IhMsNMvONN5d8ULYwMwISHLeCciIgw9niedRE Rvy5eIKS0b+lWPafQKYbS8QWFzgzoi8+GiI5we2PnM3mzB0voDW4Nlvc9dHexZFFPWd4 BkIADil+kN6Icz3XwXAZsirAa++rhlyvbHpa7G31Kgzxsva67L1gx7cAAbTZClltdBqO Uywv3xWacVQBYYor+0SZS1L4kyUBnh2E21bRIWAMsk+xjXmP1wfn5XdZ3GzWCrDfsrxv e+IhLGjecmdc5+QCwtuuoBHl/wxE6ek4YeDbnvap0fS4daxbGtKRNy1HNZMmz1Yw2o8Q PMsA== X-Gm-Message-State: AOAM533BEBhk7Sp+hxLvWXQNYttfsFOYjfQ6B8ZDxf/8w3esIFtWJQDt 5ilRTc7F+n/qnEML7rsG2O5dTg== X-Google-Smtp-Source: ABdhPJwjEnwr1b7d/xDdJEMULYxeBIxDwb3X/wQaHnBiudTS3BTD6SqME8GwsDGoPjchyNdPyOCytA== X-Received: by 2002:a05:6830:1e4a:: with SMTP id e10mr12001687otj.58.1639157616590; Fri, 10 Dec 2021 09:33:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:33:36 -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 11/12] selftests/timens: remove ARRAY_SIZE define from individual tests Date: Fri, 10 Dec 2021 10:33:21 -0700 Message-Id: <5837749541102ed658cfae6ab4b68be9f7f96688.1639156389.git.skhan@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D34AB100005 X-Stat-Signature: bpjq8fbd81ajz9y1p38ddmsob6z55pn5 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=google header.b=K0OpNOeD; spf=pass (imf05.hostedemail.com: domain of skhan@linuxfoundation.org designates 209.85.210.50 as permitted sender) smtp.mailfrom=skhan@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org X-HE-Tag: 1639157617-553046 X-Bogosity: Ham, tests=bogofilter, spamicity=0.047613, 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 timens tests and pickup the one defined in kselftest.h. Signed-off-by: Shuah Khan --- tools/testing/selftests/timens/procfs.c | 2 -- tools/testing/selftests/timens/timens.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/tools/testing/selftests/timens/procfs.c b/tools/testing/selftests/timens/procfs.c index f2519154208a..1833ca97eb24 100644 --- a/tools/testing/selftests/timens/procfs.c +++ b/tools/testing/selftests/timens/procfs.c @@ -24,8 +24,6 @@ #define DAY_IN_SEC (60*60*24) #define TEN_DAYS_IN_SEC (10*DAY_IN_SEC) -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - static int child_ns, parent_ns; static int switch_ns(int fd) diff --git a/tools/testing/selftests/timens/timens.c b/tools/testing/selftests/timens/timens.c index 52b6a1185f52..387220791a05 100644 --- a/tools/testing/selftests/timens/timens.c +++ b/tools/testing/selftests/timens/timens.c @@ -22,8 +22,6 @@ #define DAY_IN_SEC (60*60*24) #define TEN_DAYS_IN_SEC (10*DAY_IN_SEC) -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - struct test_clock { clockid_t id; char *name;