From patchwork Wed Feb 10 05:05:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timur Tabi X-Patchwork-Id: 12079849 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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 3EAA6C433E9 for ; Wed, 10 Feb 2021 05:05:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B124D64E42 for ; Wed, 10 Feb 2021 05:05:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B124D64E42 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 423ED6B0006; Wed, 10 Feb 2021 00:05:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FC046B006C; Wed, 10 Feb 2021 00:05:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C1946B0071; Wed, 10 Feb 2021 00:05:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0190.hostedemail.com [216.40.44.190]) by kanga.kvack.org (Postfix) with ESMTP id 09E8C6B0006 for ; Wed, 10 Feb 2021 00:05:57 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B02646C11 for ; Wed, 10 Feb 2021 05:05:56 +0000 (UTC) X-FDA: 77801171112.11.birth95_26031c92760d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 927921842C4BE for ; Wed, 10 Feb 2021 05:05:56 +0000 (UTC) X-HE-Tag: birth95_26031c92760d X-Filterd-Recvd-Size: 3303 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Feb 2021 05:05:55 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 09 Feb 2021 21:05:54 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 10 Feb 2021 05:05:52 +0000 Received: from ubuntu.vdiclient.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.18) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Wed, 10 Feb 2021 05:05:50 +0000 From: Timur Tabi To: Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Vlastimil Babka , Andy Shevchenko , Matthew Wilcox , , "Linus Torvalds" , , "Kees Cook" , John Ogness , , , Andrey Konovalov , Marco Elver , Rasmus Villemoes , Pavel Machek , , Subject: [PATCH 1/3] lib/test_printf: use KSTM_MODULE_GLOBALS macro Date: Tue, 9 Feb 2021 23:05:27 -0600 Message-ID: <20210210050529.843005-2-ttabi@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210210050529.843005-1-ttabi@nvidia.com> References: <20210210050529.843005-1-ttabi@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1612933554; bh=kgyfjShF7mas8HBfojx7GJ3B/MiEwf776XombejL4M0=; h=From:To:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=B+No78WC4/4cq4n39fV7wS6lKmasY1HNrGKRE8EgL459sjJiquKLPlRF8KeQChA5x 5WM5kZ3N3EosHqSbpFF+vpmfdvLu6SkTuwcD4HrXm/0p4Asc08JzFTtGLSNMZtfl52 aG+PgI2xNgpvcwX6+LzKCpdTShhp8mkiAM9DDqVhqjCCnc6trZbMUvTVTUu701yYec Du0cdwsssXgK8uqvjxFrBooZy6ul/vOweYPGzvUA1kdbbxu+5emYNE5/vaKdp23mL8 XPHscqJbogHd5v5A2vJoPT/cpIo8FfHPGPm+YN1MRYNZRjFrXfSp7u0LzHONcMgvVk v/vFQnl+7gIUw== 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: Instead of defining the total/failed test counters manually, test_printf should use the kselftest macro created for this purpose. Signed-off-by: Timur Tabi --- lib/test_printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;