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.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 2F694C433DB for ; Wed, 10 Feb 2021 05:07:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08B6664E42 for ; Wed, 10 Feb 2021 05:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbhBJFHD (ORCPT ); Wed, 10 Feb 2021 00:07:03 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:6535 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbhBJFGf (ORCPT ); Wed, 10 Feb 2021 00:06:35 -0500 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 '$' =20 -static unsigned total_tests __initdata; -static unsigned failed_tests __initdata; +KSTM_MODULE_GLOBALS(); + static char *test_buffer __initdata; static char *alloced_buffer __initdata; =20 --=20 2.25.1