Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp892285rdg; Fri, 13 Oct 2023 04:37:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJwKETK5x5uLasVDDVPogkMfVNQygjd19ftHX+Y66gsdQC12iDH9YZaIaZGWcVTfGSf2kn X-Received: by 2002:a92:ca0a:0:b0:351:e70:2cec with SMTP id j10-20020a92ca0a000000b003510e702cecmr36049462ils.20.1697197054901; Fri, 13 Oct 2023 04:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697197054; cv=none; d=google.com; s=arc-20160816; b=zJALqA3xkXjB+uRv6u6vG0kQpCtxUUZkAs5fA9fEM/3AWl2JSFCrCy0wuJQQiHxNml km15MYwSdayzwDioaL3BTvzs3ZWW5D77Oj1ryHP3VwPbAAYQgQDy4T7rB4+Oa/NcKk10 Kd1yWakhkxEyHoeUjIB7/MoNIM8PqfeAeSt9KdjwqCPkLPKc9pR/YoQ1kIEnisz0AIZW LHX/dk/HHMH34DGpfAHYGA705O7gW8Q6n39KLNjT5t+JecSh4Z736AQUESeVrPpRikja KezLETgMzXymMJAAWBcrXo0nabqJr/AYlYlAMeG9k1EHMB16888YJGHnzSEV+KC3y1ov DRWg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M5ahPAIMs2W/PxnthIZZ+YPpkQ5rr753lcf+YRXvxEg=; fh=qtD+gWrkNhH7C3mZdB5+RIyQPnUsUGmOVWssklzVers=; b=V0DZu7T3Cd72tyB4rkXvmINddGn7E239EEQbZcwg0S1e1A8ALOzBnFhioSFi486Fy7 gG+PDYmUWrBTbgOjbjR/1IY5Mi7LScWZAXFjNzZ5/ZljiMccb+nziKCz/XpBak3E1gOw 7dcvHGW491tb18DZypWYbf9a2OADgl3L5UYIxVE9mf8cy8mT8tAHpst/ZsE9mw4GaVgI RGnyLK4ml8PvoIlKM1CuJVTCISzKSxQ5P+cq5p1tXymmrBI5ms1riduXG4mhtV3IXrWV xnvTo/C3azKJYR3R24FOjazTqcPTHyVoup+oiK2wnjpOfyZ0Lbcxj9CChK0GBhYRvZtE R/Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OmR4mAHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id 5-20020a630005000000b005ab7b51ab6csi1138392pga.515.2023.10.13.04.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 04:37:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OmR4mAHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 76353839D9F1; Fri, 13 Oct 2023 04:37:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231172AbjJMLhQ (ORCPT + 99 others); Fri, 13 Oct 2023 07:37:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230512AbjJMLhP (ORCPT ); Fri, 13 Oct 2023 07:37:15 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68939CE; Fri, 13 Oct 2023 04:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697197032; x=1728733032; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lrw09RBhlTNOQ+591h8E6O2k4lnZljQLuL1ioE3nYNM=; b=OmR4mAHcgCHV49NVE3FErF/9KW7ArfdmHp+GuSerFgkm0prAWHMVbElq Y8YWSYN5HmEcxOU/IzgE8cfO/GAmbZSls2qtEZ0AHb3HBPO1fllTXzaXw /o01Ufg3ggvv+S3xg6nwWxkW+RH9zokkwEp5jvqK1LZVm3ApRPwmSi1+t DLV5TACFi8aJi2fX+oNnUnSbJNyVuoTgSxgKN08P1er5bN41aIFAY0JPe CvxVJFi/Mw6hnQzOSJY1qqA7UbQv4wk37FQbCloD1zgBwDVt3tUihll2N Ijule8oRFp9M2hYshDR8RY5BIDyLoaLF8e6hbVnXrxkOLLQDZZVKQiQ1B w==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="449353217" X-IronPort-AV: E=Sophos;i="6.03,222,1694761200"; d="scan'208";a="449353217" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2023 04:37:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="754675625" X-IronPort-AV: E=Sophos;i="6.03,222,1694761200"; d="scan'208";a="754675625" Received: from bsankiew-mobl.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.0.114]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2023 04:37:06 -0700 From: Maciej Wieczor-Retman To: Nhat Pham , Johannes Weiner , Shuah Khan Cc: ilpo.jarvinen@linux.intel.com, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/8] selftests/cachestat: Fix print_cachestat format Date: Fri, 13 Oct 2023 13:36:26 +0200 Message-ID: <0988d25d89523ba21307f70a265cd5446ae15d4d.1697196663.git.maciej.wieczor-retman@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 13 Oct 2023 04:37:28 -0700 (PDT) Compiling cachestat selftest after adding a __printf() attribute to ksft_print_msg() exposes a -Wformat warning in print_cachestat(). The format specifier in printf() call expects long int variables and received long long int. Change format specifiers to long long int so they match passed variables. Signed-off-by: Maciej Wieczor-Retman Acked-by: Nhat Pham --- Changelog v6: - Add an explanation to the patch message on how the warnings that the patch resolves were caught. (Shuah) Changelog v2: - Add Acked-by tag (Nhat) tools/testing/selftests/cachestat/test_cachestat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/cachestat/test_cachestat.c b/tools/testing/selftests/cachestat/test_cachestat.c index 4804c7dc7b31..b171fd53b004 100644 --- a/tools/testing/selftests/cachestat/test_cachestat.c +++ b/tools/testing/selftests/cachestat/test_cachestat.c @@ -27,7 +27,7 @@ static const char * const dev_files[] = { void print_cachestat(struct cachestat *cs) { ksft_print_msg( - "Using cachestat: Cached: %lu, Dirty: %lu, Writeback: %lu, Evicted: %lu, Recently Evicted: %lu\n", + "Using cachestat: Cached: %llu, Dirty: %llu, Writeback: %llu, Evicted: %llu, Recently Evicted: %llu\n", cs->nr_cache, cs->nr_dirty, cs->nr_writeback, cs->nr_evicted, cs->nr_recently_evicted); } -- 2.42.0