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.0 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 6C321C433E0 for ; Sun, 14 Feb 2021 16:14:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32A1264E56 for ; Sun, 14 Feb 2021 16:14:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbhBNQOk (ORCPT ); Sun, 14 Feb 2021 11:14:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:38942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229758AbhBNQOf (ORCPT ); Sun, 14 Feb 2021 11:14:35 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 201EC64E61; Sun, 14 Feb 2021 16:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613319234; bh=A/DF1iVDTPKIB70CF61fjiKLTM0RjrihmRPkrxfYYdQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cCc6GhcvJ0dkEmdG2Ic7W24nFo7aHuak2XdE9e1NZ2Zry+zg5owY8jiRQ9ZRF5kXp G1RsOEXDM0KHhMNM2cZ+nBhjkg2wupZO7V8U/DkvdT4XozAdOPIr6JN3CUabK1x3LP eMHaa7F4JvPi9hAxdnipRv7l22AKMuh7unCRy3kLMlw1Xbd/VEerIOEB+7bFYMocKD MHzCvHzQcuabEqZ2iwOLIa/oKK2l4asfmrw4kv+qV6/3Ose5Za6KNJ7jSkb8TSepmr CmF8Sow/TZuSDlvPkXeQvzvCDDIoxHvPBWe7aq5HBrqAwZsvQSS5UMlzcQJH5TEMOZ F0FTB98DjCFvg== 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] [v4] lib: use KSTM_MODULE_GLOBALS macro in kselftest drivers Date: Sun, 14 Feb 2021 10:13:46 -0600 Message-Id: <20210214161348.369023-2-timur@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210214161348.369023-1-timur@kernel.org> References: <20210214161348.369023-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 Acked-by: Marco Elver --- 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