linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86/intel/pmt: fix format string in unit test
@ 2025-07-09 15:16 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2025-07-09 15:16 UTC (permalink / raw)
  To: David E. Box, Hans de Goede, Ilpo Järvinen
  Cc: Arnd Bergmann, platform-driver-x86, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Another warning about incorrect format strings shows up in the unit test

In file included from include/kunit/assert.h:13,
                 from include/kunit/test.h:12,
                 from drivers/platform/x86/intel/pmt/discovery-kunit.c:9:
drivers/platform/x86/intel/pmt/discovery-kunit.c: In function 'validate_pmt_regions':
include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]

Fixes: b9707d46a959 ("platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/platform/x86/intel/pmt/discovery-kunit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel/pmt/discovery-kunit.c b/drivers/platform/x86/intel/pmt/discovery-kunit.c
index b4493fb96738..f44eb41d58f6 100644
--- a/drivers/platform/x86/intel/pmt/discovery-kunit.c
+++ b/drivers/platform/x86/intel/pmt/discovery-kunit.c
@@ -32,7 +32,7 @@ validate_pmt_regions(struct kunit *test, struct pmt_feature_group *feature_group
 		kunit_info(test, "\t\tbus=%u, device=%u, function=%u, guid=0x%x,",
 			   region->plat_info.bus_number, region->plat_info.device_number,
 			   region->plat_info.function_number, region->guid);
-		kunit_info(test, "\t\taddr=%p, size=%lu, num_rmids=%u", region->addr, region->size,
+		kunit_info(test, "\t\taddr=%p, size=%zu, num_rmids=%u", region->addr, region->size,
 			   region->num_rmids);
 
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-09 15:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 15:16 [PATCH] platform/x86/intel/pmt: fix format string in unit test Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).