Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1250810imw; Tue, 5 Jul 2022 06:26:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uYADjtrA5F8fH/WEaC5AiFjDqccaZmfJL8jExhW/8ckm/o8gu+vSdH8Lg+rZO6HQZNefGi X-Received: by 2002:a05:6402:278c:b0:439:6b09:de52 with SMTP id b12-20020a056402278c00b004396b09de52mr34595387ede.182.1657027597517; Tue, 05 Jul 2022 06:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657027597; cv=none; d=google.com; s=arc-20160816; b=KaYrcsD39zha7oJ3mtMcP3XjtuZcoPhFFTuxkK2CqjYRn+ys71e6WSXWSYdWBomgtS JJ16Cz9s4fEN+3Ylr62XQ5/RNWa1E+q8cLn6iAfbrBWdJXAJ8f5qd6/3cU1roXIySd1m C7G9uXn3vBhwKVwojMQ6Zo5yKlHg15isAWLgFpdL6UkNkhq5Q+E58RMbbhkHVPO5NgyZ wnCsG3z2px0pHanN/NRu+x2UmcnlwFln6bGUz3YpLFLXWQpysHBdZmDtMUk/YKBuga5h rFO5euQuYbqp2cnASBg964G4TGEgZdOx6IMvZ6hLvIDVryYiEyz1KuMFj7aGjfXMaFQA I/0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AI5a3v3f7ozBQ0I+en5nB+WGx5Gn1xvdc2TONZavCe0=; b=sXVxwJh4gceIIFosBdp4QTF7ztioqa/8dNLRkNfS7HNlGApdyUoTB85xGdQcAgytiR Y6vOYTtf/w/XTu1fgA4rIsI1IfohHdbPrCXg1+p5/pqDFljpdcN50bG8IOoi/AXEUS8B 6Lu7/8B+PHKF/oGjRBf2Vvmj3spXWHc822kuuzWjoP9t7xcxB4nRj/F27KketK0vAJ2D nhX2WwHSX2fCXt00pugVq7lvSPQjFanGJC9G/3yIOclCFKS86sTaaA7Ui4h7gMKkylki jb8wgL9QitEiZPFBvE4YKCh0MHtLRHQTJEkTFPwydG+KFUr3samDiqu9Lwdf01Vz5xhh n6/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jnpui4DS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht21-20020a170907609500b0072a605a57e9si13988795ejc.329.2022.07.05.06.26.12; Tue, 05 Jul 2022 06:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jnpui4DS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236768AbiGEMZS (ORCPT + 99 others); Tue, 5 Jul 2022 08:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236554AbiGEMRy (ORCPT ); Tue, 5 Jul 2022 08:17:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20FC2183B9; Tue, 5 Jul 2022 05:12:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D303619A6; Tue, 5 Jul 2022 12:12:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E5AEC341C7; Tue, 5 Jul 2022 12:12:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657023169; bh=KLewugvlQfnHhOK3fgli2q9qbyOzLhQxzieXn0BcCdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jnpui4DS7tMvR5BIqA4kYcc9rvw0vb9XmzBYAiimdcbYoQfZqJDknRo75y2L3KdW+ s6roqgz7jrTIoOApC+CMBES6+TIAvWkSkbLtHm4SYejImh9wOSvisQLBqKz3ZqbVUG 7CdE+pLA7HKiJ6subq8s9+CTFRP3o2SuaJtUmA7A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shuah Khan Subject: [PATCH 5.15 62/98] selftests/rseq: remove ARRAY_SIZE define from individual tests Date: Tue, 5 Jul 2022 13:58:20 +0200 Message-Id: <20220705115619.341529183@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705115617.568350164@linuxfoundation.org> References: <20220705115617.568350164@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuah Khan commit 07ad4f7629d4802ff0d962b0ac23ea6445964e2a upstream. 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 rseq tests and pickup the one defined in kselftest.h. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/rseq/basic_percpu_ops_test.c | 3 +-- tools/testing/selftests/rseq/rseq.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) --- a/tools/testing/selftests/rseq/basic_percpu_ops_test.c +++ b/tools/testing/selftests/rseq/basic_percpu_ops_test.c @@ -9,10 +9,9 @@ #include #include +#include "../kselftest.h" #include "rseq.h" -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - struct percpu_lock_entry { intptr_t v; } __attribute__((aligned(128))); --- a/tools/testing/selftests/rseq/rseq.c +++ b/tools/testing/selftests/rseq/rseq.c @@ -27,10 +27,9 @@ #include #include +#include "../kselftest.h" #include "rseq.h" -#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) - __thread volatile struct rseq __rseq_abi = { .cpu_id = RSEQ_CPU_ID_UNINITIALIZED, };