From nobody Thu Dec 18 00:49:53 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A7A0CDB47E for ; Fri, 13 Oct 2023 11:38:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231199AbjJMLiS (ORCPT ); Fri, 13 Oct 2023 07:38:18 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=C3=A4rvinen 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/selfte= sts/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_o= f_bits, ret =3D platform && abs((int)diff_percent) > max_diff_percent && (cmt ? (abs(avg_diff) > max_diff) : true); =20 - 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); =20 ksft_print_msg("Percent diff=3D%d\n", abs((int)diff_percent)); --=20 2.42.0