From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B05EC433E9 for ; Wed, 10 Feb 2021 21:36:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D9CE64EDA for ; Wed, 10 Feb 2021 21:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233308AbhBJVgB (ORCPT ); Wed, 10 Feb 2021 16:36:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:56128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232956AbhBJVft (ORCPT ); Wed, 10 Feb 2021 16:35:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0AB0E64EDC; Wed, 10 Feb 2021 21:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612992909; bh=opaMJmbGUaCmc56PK+hOgvVk5SMSJfQb65oUNwKsMM0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sTvTPnwIPxrWl4CaHUE8ZcmUojSiIZ7yE3ZiJQLzgY60/1ek1Yb8Y1ouJHADutrns 2PK4vVslP4QVoSjcu2sJHnJW9n2Mf27yWMrO8MDLEJE+PNaoxjla+FW4f3fY965G/3 8o50CLL/m7gEX0TvZsF0JFwsfq98qS82bDu7VIDjl48n7LbfBxF/Mia5Wp3go8YHQ/ 9zLZUdzpjGD5FH16En87XVC+ySozUjZlgukugDIsJFUtfq3VBhzK+WtOdxjNoIb+tT Hn28QhlYfsLTQSHLjn48qu2kXokuTuOsg5X0gT8Jx+OFoI0EfPh1hKmwK8Ml3pbRav fLFzP83oZmc/g== From: Timur Tabi To: Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Vlastimil Babka , Andy Shevchenko , Matthew Wilcox , akpm@linux-foundation.org, Linus Torvalds , roman.fietze@magna.com, Kees Cook , John Ogness , akinobu.mita@gmail.com, glider@google.com, Andrey Konovalov , Marco Elver , Rasmus Villemoes , Pavel Machek , Tetsuo Handa , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 1/3] [v3] lib: use KSTM_MODULE_GLOBALS macro in kselftest drivers Date: Wed, 10 Feb 2021 15:34:51 -0600 Message-Id: <20210210213453.1504219-2-timur@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210213453.1504219-1-timur@kernel.org> References: <20210210213453.1504219-1-timur@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of defining the total/failed test counters manually, test drivers that are clients of kselftest should use the macro created for this purpose. Signed-off-by: Timur Tabi Reviewed-by: Petr Mladek --- lib/test_bitmap.c | 3 +-- lib/test_printf.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 4425a1dd4ef1..0ea0e8258f14 100644 --- a/lib/test_bitmap.c +++ b/lib/test_bitmap.c @@ -16,8 +16,7 @@ #include "../tools/testing/selftests/kselftest_module.h" -static unsigned total_tests __initdata; -static unsigned failed_tests __initdata; +KSTM_MODULE_GLOBALS(); static char pbl_buffer[PAGE_SIZE] __initdata; diff --git a/lib/test_printf.c b/lib/test_printf.c index 7ac87f18a10f..ad2bcfa8caa1 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -30,8 +30,8 @@ #define PAD_SIZE 16 #define FILL_CHAR '$' -static unsigned total_tests __initdata; -static unsigned failed_tests __initdata; +KSTM_MODULE_GLOBALS(); + static char *test_buffer __initdata; static char *alloced_buffer __initdata; -- 2.25.1