All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
To: Fenghua Yu <fenghua.yu@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>,
	Shuah Khan <shuah@kernel.org>
Cc: ilpo.jarvinen@linux.intel.com, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: [PATCH v5 8/8] selftests/resctrl: Fix wrong format specifier
Date: Wed, 11 Oct 2023 10:24:04 +0200	[thread overview]
Message-ID: <e2c11ae4a3138cf362a65d7450ea3e117b25ec49.1697012398.git.maciej.wieczor-retman@intel.com> (raw)
In-Reply-To: <cover.1697012398.git.maciej.wieczor-retman@intel.com>

A long unsigned int variable is passed to the ksft_print_msg() and the
format specifier used expects a variable of type int.

Change the format specifier to match the passed variable.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
---
Changelog v4:
- Added Reinette's reviewed-by tag.

Changelog v3:
- Added Ilpo's reviewed-by tag.

Changelog v2:
- Added 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


      parent reply	other threads:[~2023-10-11  8:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  8:23 [PATCH v5 0/8] Add printf attribute to kselftest functions Maciej Wieczor-Retman
2023-10-11  8:23 ` [PATCH v5 1/8] selftests: Add printf attribute to kselftest prints Maciej Wieczor-Retman
2023-10-11 19:40   ` Shuah
2023-10-12  7:32     ` Maciej Wieczór-Retman
2023-10-12 13:06       ` Ilpo Järvinen
2023-10-12 14:30       ` Shuah Khan
2023-10-13 11:41         ` Maciej Wieczór-Retman
2023-10-11  8:23 ` [PATCH v5 2/8] selftests/cachestat: Fix print_cachestat format Maciej Wieczor-Retman
2023-10-11  8:23 ` [PATCH v5 3/8] selftests/openat2: Fix wrong format specifier Maciej Wieczor-Retman
2023-10-11  8:24 ` [PATCH v5 4/8] selftests/pidfd: Fix ksft print formats Maciej Wieczor-Retman
2023-10-11  8:24 ` [PATCH v5 5/8] selftests/sigaltstack: Fix wrong format specifier Maciej Wieczor-Retman
2023-10-11  8:24 ` [PATCH v5 6/8] selftests/kvm: Replace attribute with macro Maciej Wieczor-Retman
2023-10-11  8:24 ` [PATCH v5 7/8] selftests/mm: Substitute attribute with a macro Maciej Wieczor-Retman
2023-10-11  8:24 ` Maciej Wieczor-Retman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2c11ae4a3138cf362a65d7450ea3e117b25ec49.1697012398.git.maciej.wieczor-retman@intel.com \
    --to=maciej.wieczor-retman@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.