Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp892738rdg; Fri, 13 Oct 2023 04:38:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHJqj2whs8NLvj5gxOn3au793m0Qm9lRvNaDDlVGDCJv6Z2xRLEeKsIaFmYQRNOeNNegcr X-Received: by 2002:a05:6358:3406:b0:143:3845:e6fb with SMTP id h6-20020a056358340600b001433845e6fbmr28979162rwd.27.1697197112005; Fri, 13 Oct 2023 04:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697197111; cv=none; d=google.com; s=arc-20160816; b=MBki+8pA2xkDvQs6emcCIwGNcHSKE2ZWkAhdqjBvySNzu+kdIYEG6jKkKQS5O9erD2 ghEnqM+eWTlAdUQAz9xeIEWC3x2mh9M2ttH063KtVKXmM1I+AIzHWMVx7pHNqUKcDidh yQ9QNEKP9KV5nXYGMksszflfGEG8omFFYX2xZwHzylXynqGm8coltZBdi24uffKS9w9u 5y/p1m9xceHI0yT7ud+5YUurHJFmSUdNL0iXzxCfotNPu6+ppSomWjLdGafoYQNnViow rKLV5BDzeVs0AfEKpLN9EqI0WUm143p4TXQGlmNLjsgcj0Dp0JdSgmA4gnSEw2r9mt9l c2xg== 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=/jM81XqVcPOpFM6sFX3t6g/2QHtVjbBYZiCNlaP2kOk=; fh=/pACME0x50g4vorTSG5vEdNwgU981WFvy8LGbk4DPBk=; b=ruVsKIbWDLCdNPA+PUZtG6A3kqMRZGl0tSxfDcnbzrEyt6YnBHsfriQTv3b0yLdS0v uSKjiLuTFHxj4XCKesMDaAuBwnuAmMH18q66EdcwWD1tXAIu0ipn2bosAs5+IlbDKpgi RZIf8qZaqYLQS15RGDGAHgYxBSnpyG4cJlNvcd2Y+U8SSjRB/bzpIslEkryju7sOLzkZ yURt1X/KciGJ6v3+x6yhsGAVbRwxQtYmwEDJfUTGhN/C5joSxLTXhVCtsjNp/vJCl39q cGXbhAMcsIKIb+i/933wDtWm7RJr+cZmc7o/ZEakXZ70rMl1LWIOTbl8rDA31TnL5mSI kHUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lOSpa9+8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id g20-20020a631114000000b00563d74b6347si4235622pgl.863.2023.10.13.04.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 04:38:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lOSpa9+8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 71B28802B132; Fri, 13 Oct 2023 04:38:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231414AbjJMLiR (ORCPT + 99 others); Fri, 13 Oct 2023 07:38:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbjJMLiI (ORCPT ); Fri, 13 Oct 2023 07:38:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B51FF11B; Fri, 13 Oct 2023 04:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697197086; x=1728733086; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZZvbQAiqLOInu1U0RntXsBEHZb5uxccipeWHVXzxZd4=; b=lOSpa9+880bPVN9cSGYLYezhDGd6YGBXqf3rql+hbtuTaFhjBsGYg5HD jnroe5DHigmX9QqLEOLGpOEBuuf1KwrCzAi2+q8Zhgqe0xp9KTFIgpz8Q Xyaw5zRaZ6MsrBlCJj9z9J+mJcXNoBxDjNgAqUokBBMVkEIbPO8tia3iC Vb8eSkRpjO4o1lbd68yylxDH8XjzsPJ+uYUlIUKvr8ArgQSb1NPBi/jPO 1u2sasyNHCtYX0vigmqMNbY4nIuVMwfE+lo+Z4e+ua7EFHKgDCEIps6ci 9JRT3/Ac2sNkHMqVnmPULca35muDKtxjVIgXKIzXT3W/FX3aHy+q+pljo w==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="449353376" X-IronPort-AV: E=Sophos;i="6.03,222,1694761200"; d="scan'208";a="449353376" 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:38:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="754675871" X-IronPort-AV: E=Sophos;i="6.03,222,1694761200"; d="scan'208";a="754675871" 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:38:02 -0700 From: Maciej Wieczor-Retman To: Fenghua Yu , Reinette Chatre , Shuah Khan Cc: ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v6 8/8] selftests/resctrl: Fix wrong format specifier Date: Fri, 13 Oct 2023 13:36:32 +0200 Message-ID: <5c91c8deb7cfffeef6c32adfde9782df04f1082e.1697196663.git.maciej.wieczor-retman@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 13 Oct 2023 04:38:29 -0700 (PDT) Compiling resctrl selftest after adding a __printf() attribute to ksft_print_msg() exposes -Wformat warning in show_cache_info(). The format specifier used expects a variable of type int but a long unsigned int variable is passed instead. Change the format specifier to match the passed variable. Signed-off-by: Maciej Wieczor-Retman Reviewed-by: Ilpo Järvinen Reviewed-by: Reinette Chatre --- Changelog v6: - Add an explanation to the patch message on how the warning that the patch resolves was caught. (Shuah) Changelog v4: - Add Reinette's reviewed-by tag. Changelog v3: - Add Ilpo's reviewed-by tag. Changelog v2: - Add this patch to the series. tools/testing/selftests/resctrl/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c index d3cbb829ff6a..a5d082cd2d53 100644 --- a/tools/testing/selftests/resctrl/cache.c +++ b/tools/testing/selftests/resctrl/cache.c @@ -294,7 +294,7 @@ int show_cache_info(unsigned long sum_llc_val, int no_of_bits, ret = platform && abs((int)diff_percent) > max_diff_percent && (cmt ? (abs(avg_diff) > max_diff) : true); - ksft_print_msg("%s Check cache miss rate within %d%%\n", + ksft_print_msg("%s Check cache miss rate within %lu%%\n", ret ? "Fail:" : "Pass:", max_diff_percent); ksft_print_msg("Percent diff=%d\n", abs((int)diff_percent)); -- 2.42.0